Allow trailing comma in settings lists

codex 9 years ago updated by Joel Thornton 8 years ago 2
It would be nice if this were a legal config:

"foo": "bar",

It's easier to cut and paste individual settings this way.
Yes! This gets me every time I copy&paste setting from the default settings file to my user file.
I concur. Even though it's not technically valid JSON syntax, I have seen a number of apps and frameworks that gracefully ignore trailing/extra commas in their JSON-ish config files. Some JSON libraries out there even support "lenient" parsing of this sort out of the box, though I imagine a simple regex substitution would do the trick.