No One Has Dared Topple JSON in 23 Years

No One Has Dared Topple JSON in 23 Years

Over two decades ago, Douglas Crockford created JSON (JavaScript Object Notation), and the world hasn’t been the same. People might face problems with JSON, but nothing has come close to matching its simplistic yet tremendous capabilities.

“It’s crazy how even after 23 years, devs haven’t created anything better than JSON for the human-readable serialisation/config format,” Dmitrii Kovanikov, senior SWE at Bloomberg, posted on X, speaking about the legacy of this text-based format for storing and exchanging data for human readability.

It's crazy how after 23 years, devs haven't created anything better than JSON for the human-readable serialisation/config format

— Dmitrii Kovanikov (@ChShersh) November 30, 2024

The two closest alternatives to JSON are XML and YAML, but according to Corey Butler, a seasoned developer who is currently building Runtime, they don’t even come close to the popularity. “XML syntax is verbose and interest in it has declined for years. JSON was introduced as a lighter-weight replacement for XML, but it hasn’t completely killed off XML yet,” he said.

Butler said that YAML is somewhat popular, but it’s not really an ‘apples to apples’ comparison. “It’s close though. It’s a popular format for small-form configurations… For bulk data transfer, CSV and tab-delimited formats are popular, but they do not provide as much metadata as either JSON or XML.”

A user said wittingly, “As Doug [Douglas Crockford] would say himself, JSON was discovered, not created.”

‘Why Fix What Isn’t Broken?’

Interestingly, Kovanikov is also working on a project related to simple config language based on Category Theory principles. “Today, in my dream, the solution came to me. Everything clicked. I’m going to share the project soon,” he said.

The biggest reason for JSON’s success, even though it came years after XML, is its simplicity. JSON is simple, effective, and universally supported. “Every time someone tries to reinvent the wheel, they just make it bloated or overly complicated. YAML? A nightmare of whitespace errors. XML? Bloated bureaucratic garbage,” said a user on X.

Several articles on the web claim that JSON is slow compared to its alternatives, but the truth is, there are no real stand-alone alternatives to JSON, be it Protocol Buffers, MessagePack, BSON, or Avro.

JSON’s human-readable format, language-agnostic nature, and support for APIs make it irreplaceable in web development.

People complain about the lack of a comment section in JSON, which is the only thing that it possibly lacks. But the truth is that it was designed just for data, not comments. “All of a sudden, we are sending 50% comments in our payloads, so it’s no longer “better “. The design is stupid-proof. I like it,” said a user on X.

Maybe there is a startup somewhere whose “sole purpose is to provide a proprietary serialisation/config format file backed with AI technology”. As AI seems to penetrate everything, it seems like the inefficiency of large datasets might become a problem for JSON. Parsing files into the structure can also be slow due to the need to load the entire structure into memory.

Is Anyone Even Trying?

In an attempt to overthrow the JSON legacy, Gene Thomas from Planet Earth Software released Xenon 1.0, touting it as an alternative to XML, JSON, and YAML and “the best way to represent information.”

But following the announcement and discussion on Hacker News, things didn’t turn out well for Xenon. The article, which eventually got flagged, received a lot of criticism. Kang Seonghoon, a developer who tried building a JSON alternative earlier, said that there are several things that are just wrong with the format.

Xenon’s requirement for a mandatory BOM is problematic, especially for non-Windows users, as it is invisible by definition. The format’s arbitrary naming conventions raise questions, such as whether tabs are acceptable in names. There is a lack of clarity in distinguishing between the wire format and the serialisation protocol, leading to confusion about data types. These are some among several other problems highlighted in the comments.

Another developer who goes by the name ‘OftenSometimes’ on Dev.to, tried to build a new approach called Cbot (Character Based Object Transport) protocol, which has yet to be tested and released. According to the creator, JSON has several limitations, which he claims is “a bad habit of not guaranteeing anything”, where the user can input any name without verifying if it is connected to a string.

Cbot is designed to only have a character-based and machine-readable format. “It has a predictable and straightforward syntax, and it could be seen as a kind of small assembly language,” said the creator. But there is yet to be a tangible version created.

While people keep trying to build a JSON alternative, one thing is for sure—the 23-year legacy is hard to break.

The post No One Has Dared Topple JSON in 23 Years appeared first on Analytics India Magazine.

Follow us on Twitter, Facebook
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 comments
Oldest
New Most Voted
Inline Feedbacks
View all comments

Latest stories

You might also like...