4 ms·
I made an 'extended' JSON format, and parsing library many, many moons ago. I actually want JSON as config file, it's nice, is strict, it's easy to edit, it's h
by buserror 7y ago
I made an 'extended' JSON format, and parsing library many, many moons ago. I actually want JSON as config file, it's nice, is strict, it's easy to edit, it's hierarchical, it's nowhere near as arcane as XML, it's not as stupid as flat [config].
I added comments, a way to have node names that don't require quotes, hex constants, base64 blobs etc etc and even have annotated nodes (for translation and that sort of things).
I know it's not purist, but I never tried to shove it down people throats, it just fits my use case(s)
https://github.com/buserror/libejson https://github.com/buserror/libejson
- amelius 7y agoThis looks nice! Is there a way to have comments, such that when the file is read and then later written (by the program), the comments are preserved (even if some of the fields changed)?
- buserror 7y ago'saving' comments is difficult; and no the API doesn't handle that, but it's a pretty cool idea I'll look into it! I mean, all i can do is call the 'slaved' API with the comment content and let them re-generate them....