r/ProgrammerHumor • • 14d ago

Meme commentsInJson

Post image
6.0k Upvotes

202 comments sorted by

View all comments

Show parent comment

4

u/Jonathan_the_Nerd 14d ago

That's exactly why JSON doesn't have comments. Some implementers were putting parsing directives in comments. That risked destroying interoperability. Rather than changing the spec to require stripping out comments before parsing, Douglas Crockford just disallowed comments altogether.

2

u/Slight-Violinist-575 14d ago

That’s an interesting read, thank you sir/ma’am