4 ms·
How does that relate? Your config parser can disregard commments.
by hgsgm 3y ago
How does that relate? Your config parser can disregard commments.
- arp242 3y agoYes, but JSON was never intended for that use case – the feature set isn't geared towards it.
- mikepurvis 3y agoI think the point is that your config parser should be using yaml or toml, though in fairness neither of those existed in the early 2000s when JSON was being developed/discovered/adopted— the 800lb gorilla in that space at the time was XML. And XML remained dominant for a long time— for example, the original Google Maps from 2005 received its server responses as XML blobs, and API v2 even exposed the relevant parsing functionality as the GXml JavaScript class. By around 2007, it was all JSONp I think, and GXml was deprecated and removed in API v3 and v4 respectively.
- deepsun 3y agoWhat comments? JSON doesn't have any. And editor will rightfully mark them as errors.
- anentropic 3y agothat's the JSON5 support
- deepsun 3y agoThat's my point. Parent says that config parser can disregard comments. Why would it need to disregard comments if it was json5?