Why JSON Doesn't Allow Comments — and the JSON5/JSONC Variants That Do (and Why They Break Standard Parsers)
JSON5 and JSONC add comments and trailing commas to JSON — and if you've ever tried to add a // comment to a tsconfig.json and wondered why VS Code allows it but JSON.parse() doesn't, you've encountered the JSON variant ecosystem. Here's why JSON has no comments by design, the three overlapping "JSON with comments" specifications, why standard parsers reject JSONC content, and the preprocessing approaches for handling these variants in automation.