r/ProgrammerHumor • • 13d ago

Meme commentsInJson

Post image
6.0k Upvotes

202 comments sorted by

View all comments

Show parent comment

1

u/TwinStickDad 13d 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 13d ago

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