News for hackers. Stuff that matters.
Re:JSON or XML: Just Decide by dajobe on Thursday April 12, 2012 @09:15PM (#3834951)
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.
Re:JSON or XML: Just Decide by tptacek on Thursday April 12, 2012 @09:36PM (#3834990)
We use JSON for graphs. What sucks about it? In what sense is XML better at representing graphs?
Re:JSON or XML: Just Decide by dajobe on Thursday April 12, 2012 @09:41PM (#3835005)
There's no way to point from one part of a JSON doc to another without inventing a terminology or convention for marking the start (anchor) and end of the arc (href). People use 'id' for one end but there's no way to say a json value is actually a reference (href) not just a string. XML has that built in (ID IDREF) and so does HTML, but I didn't say XML was better, I said JSON sucks at markup and graphs. JSON's handy for serializing trees of data with no loops.
Re:JSON or XML: Just Decide by Yarnage on Thursday April 12, 2012 @10:15PM (#3835103)
What do you mean by "built in"? I don't see how or why an ID couldn't be used in the same manner; the implementation is just a little different because they store data differently.

XML is only a series of nodes and attributes. There isn't really anything else special about it and it's trivial to represent it in JSON so I'm not sure I follow your issue. Could you provide an example?

Re:JSON or XML: Just Decide by mindcrime on Thursday April 12, 2012 @11:13PM (#3835248)
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."