
INI <-> JSON
Convert an INI file to JSON or back, with sections becoming nested objects and ; or # comment lines dropped. Runs on your device, nothing is uploaded.
INI <-> JSON turns an INI file into JSON, mapping each [section] to a nested object and dropping any ; or # comment line. It also runs that conversion in reverse from a JSON object. A bare true, false, or numeric-looking value on the INI side gets coerced into a boolean or number. Converting back refuses a top-level array or scalar.
Questions
How are sections handled?
Each [section] header becomes a nested object under that name in the JSON output.
Are values type-coerced?
Yes, a bare true or false becomes a boolean and a numeric-looking value becomes a number; everything else stays a string.
What comment styles are supported?
Lines starting with ; or #, either of which is dropped entirely.
What does json-to-ini require?
A JSON object at the top level; an array or a scalar there is refused.
What happens on a malformed INI line?
A line with no = is refused, naming the exact line.