PUBLIC OBJECT

Gson 2 is out

Back in July my wife Jodie and I drove a U-Haul 4200km from Mountain View, California to our new home in Waterloo, Ontario. While in the passenger seat I pulled out my laptop and wrote some code to scratch an itch.

The itch was that Gson's databinding worked in two steps: first using the stream parser to convert the document to a tree, and then data binding on that tree. I put together a quick hack that did data binding directly from the stream.

I showed it to my fellow Gson buddies @108878564683369368287 and @100051273312240629430. To my simultaneous shock and delight, these ambitious dudes said "Let's ship this!"

What followed was a mix of heroic coding and good luck. We made a tiny change to introduce stream binding in the core writer. This broke 200 unit tests. We added another change to stream bind the reader and broke 200 more unit tests. To my surprise Inder didn't shy away. Through steady progress he and Joel fixed what we'd broken and got all of the 815 unit tests passing.

The result is the best Gson release yet. Version 2 is faster and uses less memory. It's also simpler and more predictable. I'm very proud of what we've accomplished.

google-gson