3 ms·
That's just my opinion, but even if JSON-parsing performance would be few percent worse than XML-parsing one, I would still try to use it whenever it would make
by zeroDivisible 13y ago
That's just my opinion, but even if JSON-parsing performance would be few percent worse than XML-parsing one, I would still try to use it whenever it would make logical sense.
(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.
- drunkpotato 13y agoJSON 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.