Zum Inhalt springen
uencoder

Konvertieren Java .properties files to JSON

Java .Eigenschaften Dateien verwenden key=value pairs mit dot-notation für nesting. Konvertieren in JSON für verwenden in JavaScript environments und structured access.

  1. 1

    Java .properties files use KEY=VALUE or KEY:VALUE pairs, with dot-notation for hierarchical keys (e.g., app.database.host=localhost). Comments start with # or !. They are common in Java applications for configuration and internationalization (i18n) messages.

  2. 2
    TOML-Konverter →

    Analysieren the .properties file and convert to JSON. Dot-notation keys are expanded into nested objects: app.database.host becomes {app: {database: {host: ...}}}. This makes the structure explicit and navigable.

  3. 3
    JSON-Formatierer →

    Formatieren the converted JSON. Verify that dot-notation keys were correctly nested. Properties files often use inconsistent key naming — formatting normalizes the output and makes structural issues visible.

  4. 4

    For i18n message bundles, the conversion produces a JSON object that JavaScript i18n libraries (i18next, FormatJS) can consume directly. Map Java message format ({0}, {1}) to ICU MessageFormat ({name}, {count, plural, ...}) during conversion if needed.

Häufige Fragen

How are special characters handled in .properties?
Backslash escapes: \n (newline), \t (tab), \= (literal =), \: (literal :), \\ (literal backslash). Unicode: \uXXXX. The conversion tool should handle these escapes and produce the correct characters in JSON.
Can I convert JSON back to .properties?
Yes, but only for flat or shallowly nested JSON. Deep nesting and arrays do not map cleanly to .properties dot-notation. If you need round-trip conversion, keep the JSON flat or use a format that supports nesting natively (YAML, TOML).

Workflows, die diese Aufgabe lösen

Zwei YAML-Konfigurationen über JSON vergleichen
YAML-Konfigurationen in JSON umwandeln für diff-freundlichen Vergleich strukturierter Werte.
PIPELINE
JSON-Nutzlast für URL-Transport kodieren
Ein JSON-Dokument für URL-Parameter vorbereiten: pretty-print, Base64-kodieren, dann percent-kodieren — die exakte Umkehrung der verschachtelten Parameter-Dekodierungskette.
PIPELINE
HJSON zu JSON-Format
HJSON formatieren und in Standard-JSON umwandeln.
PIPELINE
JSON formatieren und Integritäts-Prüfsumme berechnen
Ein JSON-Dokument pretty-printen und eine CRC32-Prüfsumme berechnen zur Erkennung nachfolgender Änderungen.
PIPELINE
JSON minifizieren und validieren
JSON für Inspektion formatieren und syntaktische Korrektheit in einem Durchgang validieren.
PIPELINE
JSON formatieren und TypeScript-Interface generieren
Ein JSON-Dokument formatieren dann eine TypeScript-Interface-Definition inferieren in einer Kette.
PIPELINE
Validieren, formatieren, dann JSON zu YAML umwandeln
Eine (möglicherweise minifizierte) JSON-Konfiguration in YAML umwandeln, Syntaxfehler am ersten Knoten abfangen statt subtil falsches YAML zu erzeugen.
PIPELINE
JSON5 zu JSON-Format
JSON5 formatieren und in Standard-JSON umwandeln.
PIPELINE
JSONC zu JSON-Format
JSONC (JSON mit Kommentaren) formatieren und in Standard-JSON umwandeln.
PIPELINE
JWT-Payload dekodieren und formatieren
Ein JWT-Token parsen, Payload extrahieren und JSON formatieren für Inspektion.
PIPELINE
Query-String parsen und JSON formatieren
Query-String in Schlüssel-Wert-Paare parsen dann als JSON formatieren.
PIPELINE
TOML in JSON umwandeln
Eine TOML-Konfigurationsdatei in JSON parsen fuer Tools und APIs, die JSON-Eingabe erwarten.
PIPELINE
TOML zu JSON dann CSV
TOML zu JSON dann zu CSV umwandeln fuer Datenexport.
PIPELINE
TOML zu JSON dann YAML umwandeln
Eine TOML-Konfiguration ueber JSON in YAML umwandeln fuer Kubernetes oder CI-Tooling.
PIPELINE
TOML ueber JSON in YAML umwandeln
Eine TOML-Konfigurationsdatei in YAML-Format umwandeln, mit JSON als Zwischendarstellung.
PIPELINE
Verschachtelten URL-Parameter dekodieren (Base64 JSON)
Einen URL-Parameter, der URL-kodiertes Base64-JSON transportiert, in lesbares formatiertes JSON entfalten.
PIPELINE
TypeScript-Interfaces aus YAML generieren
Ein YAML-Dokument in TypeScript-Interface-Definitionen umwandeln, mit JSON als Zwischenformat.
PIPELINE

Verwandte Tools