9 ms·
Sure, but messages in-fligt not what this is for. This is only for writing "JSON" manually. I don't think there are many use cases where you have to generate co
by captainmuon 12y ago
Sure, but messages in-fligt not what this is for. This is only for writing "JSON" manually. I don't think there are many use cases where you have to generate comments programmatically.
I haven't looked at HJSON in detail, but JSON5 which is very similar has exactly the same writing API as JSON. Namely just `stringify`, which produces plain compliant JSON.
HJSON additionally seems round-trip safe, which means if you start with comments, they are preserved, which is nice for config files.
I don't think anybody sane considers sending out non-standard HJSON over the wire where plain JSON is expected.