XML vs JSON

I ran a little experiment today in Ruby, parsing XML and JSON documents that each yield the same Hash structure.

 Runs per/sec: XML:  2,208 - JSON: 56,506 

That’s right, JSON is 20x faster.  Each implementation system is different of course, but it makes sense that JSON is probably faster than XML on most systems by some factor because it is simpler.

I had never thought about using JSON to communicate between services internally for our site, but now I am…

Blog comments powered by Disqus