4 ms·
> Why would the JSON version of that fragment suck pretty hard? ["p", "this is a", ["a", { "text" : "link", "href": "http://example.com" } ], "." ] I don'
by bct 19y ago
> Why would the JSON version of that fragment suck pretty hard?
["p", "this is a", ["a", { "text" : "link", "href": "http://example.com" } ], "." ]
I don't do much JSON so maybe that can be improved, but I wouldn't imagine by much.
Certainly there are lots of other factors to be considered, but that just goes to prove my point; that "XML Sucks" rarely looks at anything beyond very simple uses of XML.
- fauigerzigerk 19y agoMaybe like this: ["p", "this is a", ["a", "link", {href: "http://example.com http://example.com"}], "."] If that is uglier is debatable, maybe a little bit. However, the point is really that suckyness is not just a matter of esthetics. All the more I agree with your second point.
- twism 19y agoi think both JSONs above are a bit lispy :)... {"p":{">":"this is a","a":{"@":"http://example.com",">":"link"},">":"."}
- twism 19y agomissing closing "}"
- bct 19y agoNow bold something inside the link, and put a class attribute on the paragraph.
- twism 19y agoi actually thought about that, its harder to read than plain ol html {"p":{">":"this is a","a":{"@href":"http://example.com","b":{">":"link"}},">":".","@class":"my-p-class"}}
- leoc 19y agoNow imagine the complete works of Shakespeare in that format...
- fauigerzigerk 19y agoyou're right, but look at an average html page. Is that pretty? I guess it makes no sense to argue about purely syntactical issues. Comparing static HTML and JSON is not what it's about in the real world.