A request: JSON6, with just one additional feature

154 views
Skip to first unread message

vora...@gmail.com

unread,
Feb 25, 2016, 2:40:16 AM2/25/16
to JSON5
I just came across JSON5 and think it's a great idea. JSON is wonderful, but it is so unfortunate that the trailing comma issue wasn't resolved before its release. It's great to see JSON5 resolves this. (And while I personally disagree with allowing comments in JSON5 --- because it's data that's not captured --- it's a small objection.)

I just have one request that I think would make JSON pretty much perfect: backtick (multiline) strings. (But no template strings, of course.) That would give configuration files true multiline strings that aren't horrible to maintain (for humans).

Just a thought (hope). I would totally understand it if you ignore it. :)

Jordan Tucker

unread,
Feb 25, 2016, 10:58:50 AM2/25/16
to vora...@gmail.com, JSON5

@voracity

Thanks for your suggestions. Although it's true that JSON is primarily a data exchange format, due to its popularity it is often used as a configuration file format. That's the main motivation behind allowing comments in JSON5, to provide users a way to document their configuration files.

Backtick strings have been suggested a few times, but the maintainers (myself included) feel that this feature is outside the scope of JSON5. Please see the discussion on GitHub at https://github.com/aseemk/json5/issues/52

Thanks.

--
You received this message because you are subscribed to the Google Groups "JSON5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json5+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vora...@gmail.com

unread,
Feb 25, 2016, 7:41:32 PM2/25/16
to JSON5, vora...@gmail.com
Thanks Jordan. My apologies, I had thought it may have already been suggested, but wasn't able to find anything on a quick search around. (I should have just searched for JSON6!) The issue you linked to gives me hope, though, that a JSON6 (that's equally minimalist) will appear some day. Hopefully not too far away. :)

Comments are undeniably useful for configuration files. My primary concern is that it fills a non-universal need (structured data is a universal need, unstructured meta-data not so much), and therefore makes it far less likely to be widely supported. If JSON5 ended up having support as wide as JSON's, I don't think I'd have any issue with it at all.
Reply all
Reply to author
Forward
0 new messages