Convert JSONC to INI

Turn JSONC 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 JSONC files on the dialor turn it to pick what to do

JSONC settings turned into INI sections.Objects become sections, and values at the top come first.

  1. What you get

    One INI file. Plain values at the top level are written first. Each top-level object becomes a section, such as [server].

    An object inside a section becomes its own section with a dot in its name. An object called tls inside server becomes [server.tls].

  2. How lists are written

    A list becomes a repeated key, one line for each item. An empty list disappears, because there is nothing to repeat.

    Objects or lists inside a list are written as JSON text.

  3. Top-level lists

    When the whole file is a list, each entry becomes its own section, numbered from 0 under items, as in [items.0]. An entry that is not an object goes under the key value.

  4. What it leaves behind

    Comments and trailing commas are dropped. The settings keep their keys and values, but the comments that explained them do not reach the INI file.

    To go the other way, use INI to JSONC.

JSONC and INI.What each format is.

The formats

From · JSONC

JSON with Comments

JSON that allows comments, as in editor and TypeScript configuration files.

Extensions
.jsonc
MIME type
text/x-jsonc
Kind
Text and data
To · INI

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 JSONC to INI conversion through the API, for your app or your agent.

terminal
$ cv convert report.jsonc report.ini
$ cv convert report.jsonc report.ini

Questions.What people ask about JSONC to INI.

01OF 04

No. Comments are dropped, and so are trailing commas.

It becomes its own section named with a dot. An object tls inside server becomes [server.tls].

It disappears from the INI file. A list with items becomes a repeated key.

Yes. Each entry becomes a section numbered from 0 under items, such as [items.0]. An entry that is not an object goes under the key value.

More conversions.Other ways in and out of JSONC and INI.