logoalt Hacker News

xgulfieyesterday at 4:28 PM3 repliesview on HN

I've seen people put "//" keys in their json lol


Replies

reddaloyesterday at 5:20 PM

I've also seen using "__" as a key for comments. I think it's better because it doesn't need to be escaped.

hutattedonmyarmyesterday at 5:35 PM

There _is_ a json variant with comments, so that’s what you’ve seen. Not all parsers support that though

show 2 replies
stronglikedanyesterday at 5:14 PM

It's not terrible as far as I know, and it's less ambiguous than putting a "comment" key. I like it!