cvtima
Last Updated: September 03, 2019
·
2.985K
· zonetti

Commenting in JSON

{
  "field": "Commenting this field...",
  "field": 1337,

  "lorem": "Lorem ipsum dolor...",
  "lorem": "ipsum"
}

This is a valid JSON. When parsed it becomes:

{
  "field": 1337,
  "lorem": "ipsum"
}

Credits: http://fadefade.com/json-comments.html

HN Discussion: https://news.ycombinator.com/item?id=6146880

3 Responses
Add your response

8326

The relevant HN discussion

over 1 year ago ·
8363

look at the comments to the stackoverflow answer and think again if it's a good solution: http://stackoverflow.com/questions/244777/can-i-comment-a-json-file/18018493#18018493

over 1 year ago ·
8364

It's definitely not a good solution. It's just interesting :)

over 1 year ago ·