Protocol Buffers versus JSON or BSON

Jeff Meatball Yang picture Jeff Meatball Yang · Jan 4, 2010 · Viewed 54.8k times · Source

Does anyone have any information on the performance characteristics of Protocol Buffers versus BSON (binary JSON) or versus JSON in general?

  • Wire size
  • Serialization speed
  • Deserialization speed

These seem like good binary protocols for use over HTTP. I'm just wondering which would be better in the long run for a C# environment.

Here's some info that I was reading on BSON and Protocol Buffers.

Answer

James Newton-King picture James Newton-King · Jan 4, 2010

This post compares serialization speeds and sizes in .NET, including JSON, BSON and XML.

alt text

alt text

http://james.newtonking.com/archive/2010/01/01/net-serialization-performance-comparison.aspx