3 ms·
If you're trying to parse it, you don't need to tell. Just parse as JSON5, it's a strict superset. And if you're editing a file, you can usually tell by the fa
by int_19h 8y ago
If you're trying to parse it, you don't need to tell. Just parse as JSON5, it's a strict superset.
And if you're editing a file, you can usually tell by the fact that there are comments in it. :)
- h1d 8y agoOfficial json5 site does mention using .json5 extension to be obvious but I bet people will just use .json which will be confusing if the file is passed to another party and they get parse error until they realize it's json5. I think the only downside to json5 is that they inherited the name json instead of coming up with a different name.