Re:XML Can Give the Same Performance as JSON
by drunkpotato on Thursday August 15, 2013 @08:56AM
(#6217460)
JSON is great for data interchange. I think better than XML because its simpler structure encourages simpler interchanges than XML.
For me, a disadvantage in JSON for configuration files is the lack of comments. My current project uses JSON for config and I sorely miss 1) comments and 2) unquoted config var names. I'd rather use YAML or another format with a config loader for whichever language I'm using.
(web services - JSON; configuration files - JSON for simpler files, XML for more complicated ones AND only if JSON couldn't handle it).
Also, I might be missing something but it appears that this benchmark doesn't take into consideration libraries used server-side to serialize and deserialize JSON / XML? I'd say that depending on those, there can be some big differences.
Not mentioning the fact that bigger impact on the feel how "snappy" application is lies in the overall application design, than in choosing whether we are using JSON / XML / YAML / anything else to transmit the data.