Hacker News new | ask | show | jobs
by remon 554 days ago
I'm not super invested in this debate one way or the other but arguing a comment should be part of your data rather than documenting what data is contained is a bizarre take on the question. Either be of the opinion it's a data format and comments are just out of scope (and using JSON for e.g. config is just a bad choice), or agree that allowing comments in JSON should be part of the spec since right or wrong it is used for config and other human edited use cases. JSON5's adoption seems to imply people are mostly on the latter side of the fence.
1 comments

I don't find the argument incoherent at all

either it's a data transfer format and comments should be stripped before transmission

or the comments are part of the data model

makes you have to think clearly whether the comments are just "notes to self" at authoring time, or something relevant to the consumer

OTOH of course there are plenty of 'greyer' cases