Update JSON Spec

As the current editor of the JSON spec, I think I can speak to this. Unfortunately, I suspect you are not likely to be happy with the answer. The short version is: the design of JSON is frozen and will never change. The phrasing of the specification itself may change if somebody discovers ambiguities or some interpretation of the existing spec language that is inconsistent with the design of the JSON format, but that format itself is fixed. This unquestionably has its plusses and minuses. One of the big minuses, as you observe, is that some commonly used data types have no defined representation, which is a genuine source of frustration and implementation difficulty. Based on what we have learned in the past 20 years, if we had it to do over again it's likely we'd have done a few things differently (goodness knows there are things I'd like to change!). However, at this stage changing JSON would break the world, so we just can't.

JSON's bedrock immutability is part and parcel of its value as a data interchange format, because it helps protect us from one of the Internet's nastiest sources of instability, version shear: what happens when software written to one version of a data spec tries to read data written by software written to a different version of that spec. Higher level data representations can have rules for managing backwards compatibility and higher level protocols can have means of negotiating a common understanding between communicants, but being able to do those things rests on having some primitive, underlying layer of stability that can be reliably assumed by all parties. JSON is intended to be such a layer. JSON's fundamental simplicity and stability is a large part of why it displaced XML for a huge swath of applications, despite the fact that XML actually had support for all those things you cited even before JSON came on the scene.

Arguably it might be time to consider creating a new generation fundamental data representation standard, but this would be a new and different standard from JSON. I have some opinions about what that might look like, but I'll save them for a different discussion in the interest of maintaining the focus of this thread. Certainly if you have ideas for such a representation (and the time and energy to devote, no trivial thing!) it could be a worthy cause.

4 Likes