←back to thread

Fixing JSON

(www.tbray.org)
139 points robin_reala | 2 comments | | HN request time: 0.468s | source
Show context
tootie ◴[] No.12327768[source]
If you did all of that you'd still fall way short of what you have been able to do with XML for probably 10 years. XSD defines structure in terms of inheritance, composition, strong types, numerical ranges, enumerations, referential integrity, namespaces.
replies(3): >>12327878 #>>12327879 #>>12329566 #
stouset ◴[] No.12327878[source]
Raise your hand if you miss hand-editing or reading XML.
replies(2): >>12328096 #>>12328137 #
1. oconnore ◴[] No.12328096[source]
Requiring that a markup language (that must be sent across the wire between multiple buggy parser implementations) be hand editable is a recipe for disaster, and will never be as flexible as building/modifying an appropriate AST in a scripting language.

There's not even a good reason to read HTML anymore. You hit Ctrl+Shift+C in Firefox (or I think it's J in Chrome) and you view the actual machine-parsed DOM structure. The only reason human-editable/readable formats were ever necessary is a lack of appropriate dev tooling.

replies(1): >>12330713 #
2. kuon ◴[] No.12330713[source]
I have to agree, I've been working with JSON for 10 years and nearly never touched JSON by hand.