Tech History

Fun Facts About JSON: More Than Just Brackets

3 min readBy OctalOne Team
TL;DR

The Accidental Standard

JSON wasn't "invented" in a traditional sense; it was discovered. It's strictly a data format, which is why it famously has no comments and no trailing commas. It's designed to be simple, stable, and language-independent.

1. It Was "Discovered", Not Invented

Douglas Crockford, the person often credited with JSON, claims he didn't invent it. He simply discovered a subset of JavaScript that could be used as a data format.

In 2001, needing a lightweight way to send data between servers and browsers without using Flash or XML, he and his team realized that JavaScript object literals were perfect for the job. They wrote up the spec, and JSON (JavaScript Object Notation) was born.

2. Why No Comments?

One of the biggest complaints about JSON is the lack of comments. You can't add a // TODO or explain a complex configuration value.

The Reason: Interoperability

Crockford removed comments intentionally. He saw that in other formats, people used comments to store parsing directives (special instructions for the parser), which broke compatibility between different systems.

To keep JSON pure and compatible everywhere, he made the tough call: no comments allowed.

3. The Trailing Comma Trap

If you write JavaScript, you might be used to leaving a comma after the last item in an object:

// Valid JavaScript
const obj = {
  name: "OctalOne",
  type: "Tools", // <--- Trailing comma is fine
};

But in JSON, this is a syntax error.

// Invalid JSON
{
  "name": "OctalOne",
  "type": "Tools", // <--- ERROR! No comma allowed here
}

This strictness simplifies writing a parser for JSON, as you don't need to handle "empty" slots after a comma.

4. The "Good, Not Evil" Clause

When Douglas Crockford released the reference implementation of JSON in Java, he included a license with a peculiar requirement:

"The Software shall be used for Good, not Evil."

This cheeky clause actually caused headaches for corporate lawyers (like at IBM), who had to ask Crockford for a special waiver saying they could use it for "Evil" if they wanted to (mostly just to cover their bases legally!). He granted a specific waiver for IBM to use it for "Evil".

Dealing with Messy JSON?

Format, validate, and beautify your JSON data securely offline.