Convert JSON to INI
Turn JSON files into INI. Top-level objects become [sections] and plain top-level values come first, and an object inside a section becomes its own section named with a dot, such as [server.tls].
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop JSON files on the dialor turn it to pick what to do
JSON settings as an INI file.Objects become sections, and nested objects become dotted sections.
What you get
One INI file. Plain top-level values come first. Each top-level object becomes a [section], and an object inside a section becomes its own section named with a dot, such as [server.tls].
A top-level list becomes one section per entry, numbered from 0 under items, such as [items.0]. An entry that is not an object goes under the key value.
How lists are written
A list becomes a repeated key, so each item gets its own line with the same key name. An empty list disappears, because there is no item to write.
INI has no place for nesting inside a list. Objects or lists inside a list are written as JSON text on the key's line.
When it stops
If the file cannot be parsed as JSON, the conversion stops with
input_corrupted.If the file holds something INI cannot carry, it stops with
unsupported_elements. The same code appears when some inputs cannot become the format the join takes.To go the other way, use INI to JSON.
JSON and INI.What each format is.
The formats
JSON
JSON, the data format of every API.
- Extensions
- .json
- MIME type
- application
/json - Kind
- Text and data
INI
Sections of key and value pairs, the settings format of Windows and many tools.
- Extensions
- .ini .cfg
- MIME type
- text
/x -ini - Kind
- Text and data
In your code.The same JSON to INI conversion through the API, for your app or your agent.
$ cv convert report.json report.ini$ cv convert report.json report.iniQuestions.What people ask about JSON to INI.
Each nested object becomes its own section with a dotted name. An object named tls inside server becomes [server.tls].
It disappears from the INI file. A repeated key needs at least one item, and an empty list has none.
Yes. Each entry becomes a section numbered from 0, such as [items.0]. An entry that is not an object goes under the key value.
Yes. INI to JSON handles that direction.