News for hackers. Stuff that matters.
Re:XML Can Give the Same Performance as JSON by Mindless2112 on Thursday August 15, 2013 @10:14AM (#6217846)
If you have untrusted input, XML has it's own issues [1].

> JSON is fundamentally a dump of a data structure, not a document format.

Exactly! IMHO, it's unfortunate that mark-up documents can be used to represent other data structures. It isn't what they're meant for, and there are (or "should be" if you're not fond of JSON) better tools for human-readable serialization.

[1] http://en.wikipedia.org/wiki/Billion_laughs

Re:XML Can Give the Same Performance as JSON by zdw on Thursday August 15, 2013 @12:22PM (#6218849)
IMO, if you're schema design would pass a Billion laughs style attack as being a valid file, you're probably doing something wrong.

SAX style streaming/pull parsers tend to deal better with this kind of thing as well.

Re:XML Can Give the Same Performance as JSON by zanny on Thursday August 15, 2013 @10:51AM (#6218119)
You mean yaml?
Re:XML Can Give the Same Performance as JSON by Mindless2112 on Thursday August 15, 2013 @12:09PM (#6218729)
Indeed, YAML is a more powerful serialization format than JSON.

The original name (Yet Another Markup Language) threw me off, so I never seriously considered using it. Even its Wikipedia article is in the "Markup languages" category.

Re:XML Can Give the Same Performance as JSON by zdw on Thursday August 15, 2013 @12:16PM (#6218811)
My general guidance is:

Yaml for configuration files/things people touch

XML for documents that are complex/nested, that need extra validation, or need to be stored for longer than a few days

JSON for ephemeral data structures passed between two controlled endpoints