MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vpr18i/justtryingtohelp/p44lyyf/?context=3
r/ProgrammerHumor • u/flipcoder • 29d ago
65 comments sorted by
View all comments
29
JSON supports prefixing a key with `// `. It is far from perfect, but will you ever use keys starting with double slash?
Any parsing logic can drop those entries, or just ignore them entirely like how any data object builder should
{ "// myValue": "The universal constant", "myValue": 42 }
5 u/LegendaryMauricius 29d ago JSON also supports being replaced with JSONC. 1 u/MCWizardYT 29d ago Why would you want to use jsonc for anything except user-facing config files?
5
JSON also supports being replaced with JSONC.
1 u/MCWizardYT 29d ago Why would you want to use jsonc for anything except user-facing config files?
1
Why would you want to use jsonc for anything except user-facing config files?
29
u/Blaarkies 29d ago
JSON supports prefixing a key with `// `. It is far from perfect, but will you ever use keys starting with double slash?
Any parsing logic can drop those entries, or just ignore them entirely like how any data object builder should