Convert JSON5 to PROPERTIES

Turn JSON5 files into PROPERTIES. Each value becomes one key=value line with Java escapes, under its path of keys joined with dots and list positions in brackets, such as server.hosts[0], and a top-level list is written under items, such as items[0].name.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop JSON5 files on the dialor turn it to pick what to do

JSON5 as flat key=value lines.Every value gets its own line, named by its path of keys.

  1. What you get

    A PROPERTIES file with one key=value line for each value in the JSON5 file. Each key is the path to the value, with the keys joined by dots. Positions in a list go in brackets, such as server.hosts[0].

    Values are written with Java escapes, as the Java properties format expects.

  2. Lists at the top

    When the JSON5 file is a list at the top level, its entries are written under items. A key inside the first entry then looks like items[0].name, where name is a key in that entry.

  3. What changes

    Comments are dropped, because PROPERTIES has no place for them. JSON5 numbers become plain numbers.

    An empty object or list is written as JSON text, so it still gets a line of its own.

JSON5 and PROPERTIES.What each format is.

The formats

From · JSON5

JSON5

JSON with comments, trailing commas and unquoted keys.

Extensions
.json5
MIME type
application/json5
Kind
Text and data
To · PROPERTIES

Java Properties

Key and value pairs in the Java properties format.

Extensions
.properties
MIME type
text/x-java-properties
Kind
Text and data

In your code.The same JSON5 to PROPERTIES conversion through the API, for your app or your agent.

terminal
$ cv convert report.json5 report.properties
$ cv convert report.json5 report.properties

Questions.What people ask about JSON5 to PROPERTIES.

01OF 04

The keys on the way to a value are joined with dots, and list positions go in brackets. A value in a list under server comes out as server.hosts[0].

They are dropped. The PROPERTIES file holds only the values.

Its entries are written under items, with the position in brackets. A key inside the first entry is written as items[0].name.

PROPERTIES to JSON5 goes the other way.

More conversions.Other ways in and out of JSON5 and PROPERTIES.