r/ProgrammerHumor • • 7d ago • Bravo 1

Meme commentsInJson

Post image
6.0k Upvotes

205 comments sorted by

View all comments

Show parent comment

1

u/TwinStickDad 7d ago

Depends on your parser and where you're defining your json. If you're just creating a JSON file then you should be getting errors because that's not valid JSON. There are other formats like jsonc which just strip the comment lines before parsing to JSON. Apparently the new standard will support comments. 

1

u/frayien 7d ago

Yeah, it seems I just got lucky and my use cases always silently use jsonc