Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm eagerly awaiting the C, C++, and Python implementations. Has anyone started on these?

Extending rapidjson, jsoncpp, yajl, and simplejson seems like a natural place to start.



I have a python implementation, but haven't found the time to share it yet.

Funnily, I independently "invented" this before I found JSON5. I called it "yottson", because that's how JSON would be pronounced in German and what I sometimes call it in my head. Its a fitting name, because it is my ideosyncratic "almost JSON".

Formats like this are mostly meant to be used for configuration files. For example the sublime-text configuration files are JSON + comments. I don't know what all the hate is for, it's clear that you wouldn't send this over a wire to a client expecting pure JSON. In fact, the serializers in JSON5 and in Yottson only ever create standard-compliant JSON. Its a case of "be liberal in what you accept, strict in what you send".

One thing I'd still like to implement though is lossless parsing. The parser would keep track of all the comments and whitespace, so that when you change a value programmattically in the config file, it only modifies the value and preserves all the indentation and comments. Right now, as I mentioned, writing the file programmattically always results in pure compliant JSON, but kills all comments.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: