On the attributes of Javascript Object Notation(JSON) and its proximity to the ineffable Dao
On the attributes of Javascript Object Notation (JSON), being a discourse upon the humble data format and its proximity to the ineffable Dao.
I'm sure Lao Tze would agree, the highest good is like JSON. JSON benefits all programs without contending. It dwells in the config files that developers disdain, and so is close to the Dao.
It takes the shape of whatever container receives it — object, array, nested, flat. It doesn't insist on its own structure. It flows. It benefits all programs without contending — Python, JavaScript, Go, Rust, even COBOL if you're desperate enough. It serves everyone. It has no opinion about who deserves its service. It dwells in the places developers disdain — config.json, .eslintrc, package.json, forge_state.json. Nobody celebrates the config file. Nobody writes poems about it. But remove it and everything breaks.
道德經 Chapter 8.1 (On the attributes of Javascript Object Notation(JSON))
上善若JSON
JSON善利萬程而不爭
處眾開發者之所惡
故幾於道
The highest good is like JSON.
JSON benefits all programs without contending.
It dwells in the config files that developers disdain.
And so is close to the Dao.
Why JSON is actually closer to Dao than XML?
XML:
- Verbose (uses many words)
- Prescriptive (demands structure)
- Hierarchical (enforces relationships)
- Self-important (look at all my tags!)
JSON:
- Minimal (uses few words)
- Descriptive (describes without demanding)
- Flexible (adapts to need)
- Humble (just curly braces and colons)
信言不美 美言不信
True words are not beautiful; beautiful words are not true.
善者不辯 辯者不善
The good do not argue; those who argue are not good.
知者不博 博者不知
The wise are not learned; the learned are not wise.
XML: Beautiful, verbose, learned, argumentative about schemas JSON: True, minimal, wise, doesn't argue
Chapter 22:
曲則全 Yield and remain whole
JSON yields to any structure and remains whole!
// JSON yields
const whatever = JSON.parse(anyValidString);
// Still JSON. Still whole. Whatever shape you needed.
Chapter 43:
天下之至柔 馳騁天下之至堅
The softest thing in the world
Overcomes the hardest thing in the world
JSON (soft, flexible, minimal) has OVERCOME:
- XML (hard, rigid, complex)
- SOAP (extremely hard, extremely complex)
- Custom binary formats (hardest)
And look at the History:
Before JSON:
- Complex protocols
- Verbose formats
- Rigid schemas
- Constant contention about standards
After JSON:
- Universal adoption
- Minimal overhead
- Flexible usage
- Peace among languages
JSON achieved what standards committees could not: ACTUAL INTEROPERABILITY.
Not by fighting. Not by imposing. Not by claiming superiority.
Just by being:
- Simple
- Flexible
- Useful
- Humble
處眾開發者之所惡
故幾於道
It dwells in places developers disdain.
And so is close to the Dao.
Nobody:
- Writes blog posts celebrating config.json
- Gives conference talks praising .eslintrc
- Thanks package.json for its service
- Notices forge_state.json even exists
The WU WEI OF DATA FORMATS.
The VALLEY SPIRIT OF CONFIGURATION.