> Schemas Are Awesome<p>No reason you can't implement schemas over JSON. In fact, you typically implicitly do - what your code is expecting to be present in the data structures deserialized from JSON.<p>> Backward Compatibility For Free<p>JSON is unversioned, so you can add and remove fields as you wish.<p>> Less Boilerplate Code<p>How much boilerplate is there in parsing JSON? I know in Python, it's:<p><pre><code> structure = json.loads(json_string)
</code></pre>
Now then, if you want to implement all kinds of type checking and field checking on the front end, you're always welcome to, but allowing "get attribute" exceptions to bubble up and signal a bad data structure have always appealed to me more. I'm writing in Python/Ruby/Javascript to avoid rigid datastructures and boilerplate in the first place most times.<p>[EDIT] And for languages where type safety is in place, the JSON libraries frequently allow you to pre-define the data structure which the JSON will attempt to parse into, giving type safety & a well define schema for very little additional overhead as well.<p>> Validations and Extensibility<p>Same as previous comment about type checking, etc.<p>> Easy Language Interoperability<p>Even easier: JSON!<p>And you don't have to learn yet another DSL, and compile those down into lots of boilerplate!<p>I'm not trying to say that you shouldn't use Protocol Buffers if its a good fit for your software, but this list is a bit anemic on real reasons to use them, particularly for dynamically typed languages.