A modest proposal
PROPOSED STANDARD
Errata Exist
Internet Engineering Task Force (IETF) Adam Williamson
Request for Comments: 9999 Red Hat
Updates: 7159 September 2017
Category: Standards Track
ISSN: 9999-9999
Let Me Put a Fucking Comma There, Goddamnit, JSON
Abstract
Seriously, JSON, for the love of all that is fucking holy, let me
end a series of items with a fucking comma.
Comments
It sure looks like a good effort, yeah. Be nice to see wider adoption of it or some other similar effort. Maybe an RFC would help ;)
No, it's mostly about human generation. As the json5 description cogently points out, JSON is no longer solely used by bits of code talking to each other; it's commonly used as a configuration format or for other purposes that involve human generation / editing.
(The specific case I ran into which triggered this blog post was that I have a Python project which defines a default value for some element of configuration in Python, and allows modification of it by loading a JSON file; I took the valid Python and saved it as a JSON file as the start point for modifying it, modified it as I wanted, and then it didn't work because of this stupid 'can't end a set of elements with a trailing comma' crap so I had to change that).
"Trailing comma just looks weird"
You are, of course, free not to use one.
"also, {item,} is different from {item, ”} now?"
Of course it is. Those are two very different things. An empty string is very different from...nothing.