Live data from Hacker News

JSON or XML: Just Decide

mnot.net

41–44 of 44 posts

Re: JSON or XML: Just Decide

#41
post #16

I like Turtle: dc:title "RDF/XML Syntax Specification (Revised)" ; ex:editor [ ex:fullname "Dave Beckett"; ex:homePage ] . It's only useful if you drank the RDF kool-aid (like I have), though.

You have good taste, since I invented Turtle. To keep this on topic, I've been using JSON for data web APIs since that's what it's best at. It sucks at: markup and graphs of course.

Holy %!#@, I never knew the inventor of Turtle posted on HN. That's awesome. Turtle does, indeed, rock. But I'm also a Semantic Web Koolaid drinker, so my viewpoints may be a bit out of line with the "mainstream."

Re: JSON or XML: Just Decide

#42

Earlier quoted context omitted.

Yeah, the XML ecosystem is priceless. XPath, for example, is the one reason a project I'm working on can't switch to JSON.

I was about to ask if JSON had an equivalent to XPath / XQuery, but it looks like the answer is "yes." http://stackoverflow.com/questions/8481380/is-there-a-json-e... That's cool to know, and I might just give it a look. But my perception is still that the supporting ecosystem around XML is more mature and comprehensive, at least for some use-cases.

Have you followed the link? Dead. :-(

Re: JSON or XML: Just Decide

#43
post #14

Or... they're designed for different purposes and not even competitors. XML is a markup language: http://en.wikipedia.org/wiki/Markup_language It was designed for documents. Try converting an HTML page to JSON. Try something as simple as: Hello World! The most common introductory program is called Hello, World . Go on. If you think JSON wins, just do it, and post it below. The problem was when people started mis-appl…

Yes, JSON is no ML, but YAML is, which is a superset of JSON's semantics/features. You're perfectly right that JSON is not always the right tool for transporting a document, but I still wouldn't regard XML as the best tool for any of those cases.

Please post an example of the HTML above in YAML (or your preferred language) that would be better than SGML or XML.

Sidenote: YAML doesn't consider itself a markup language. See the renaming: http://en.wikipedia.org/wiki/YAML

Re: JSON or XML: Just Decide

#44
post #14

Or... they're designed for different purposes and not even competitors. XML is a markup language: http://en.wikipedia.org/wiki/Markup_language It was designed for documents. Try converting an HTML page to JSON. Try something as simple as: Hello World! The most common introductory program is called Hello, World . Go on. If you think JSON wins, just do it, and post it below. The problem was when people started mis-appl…

Yes, JSON is no ML, but YAML is, which is a superset of JSON's semantics/features. You're perfectly right that JSON is not always the right tool for transporting a document, but I still wouldn't regard XML as the best tool for any of those cases.

[deleted]
Post reply on HN