+ 1
How to convert a simple INI file contents into JSON?
For a future project, I am planning to make some IDE-like program dealing with INI files. Probably Python or JavaScript
2 Answers
+ 3
If you are using nodejs, check out the `ini` package on npm:
const fs = require('fs');
const ini = require('ini');
const file = fs.readFileSync('./config.ini', 'utf-8');
const parsed = ini.parse(file);
const json = JSON.stringify(parsed);
console.log(json);
+ 3
Found one in Github, for Python. Maybe you can extend from it.
https://gist.github.com/Natim/4509560