r/ProgrammerHumor • • 7d ago • Bravo 1

Meme commentsInJson

Post image
6.0k Upvotes

205 comments sorted by

View all comments

Show parent comment

2

u/nameless_pattern 7d ago

You could keep them just in Dev deployments?  lot of messy trade-off choices

4

u/Turbulent_Stick1445 7d ago

The #1 place I've seen comments in JSON are where someone makes the mistake of using JSON for a configuration file format. The lack of support for comments is ironically why even XML is a better choice for that. Regardless, you can understand why people would want comments there outside of just dev environments.

(I just learned as of two hours ago that YAML can be used with JSON syntax so I guess it's academic, just use YAML...)