* Added support for `java.util.Currency`, `AtomicLong`, `AtomicLongArray`, `AtomicInteger`, `AtomicIntegerArray`, `AtomicBoolean`. This change is backward-incompatible because the earlier version of Gson used the default serialization which wasn't intuitive. We hope that these classes are not used enough to actually cause problems in the field.
* Added support to serialize objects with self-referential fields. The self-referential field is set to null in JSON. Previous version of Gson threw a StackOverflowException on encountering any self-referential fields.
* The most visible impact of this is that Gson can now serialize Throwable (Exception and Error)
* Added support for @JsonAdapter annotation on enums which are user defined types
* Fixed bug in getPath() with array of objects and arrays of arrays
* The new @JsonAdapter annotation to specify a Json TypeAdapter for a class field
* JsonPath support: JsonReader.getPath() method returns the JsonPath expression
* New public methods in JsonArray (similar to the java.util.List): `contains(JsonElement), remove(JsonElement), remove(int index), set(int index, JsonElement element)`
* Gson now allows a user to override default type adapters for Primitives and Strings. This behavior was allowed in earlier versions of Gson but was prohibited started Gson 2.0. We decided to allow it again: This enables a user to parse 1/0 as boolean values for compatibility with iOS JSON libraries.
* (Incompatible behavior change in `JsonParser`): In the past, if `JsonParser` encountered a stream that terminated prematurely, it returned `JsonNull`. This behavior wasn't correct because the stream had invalid JSON, not a null. `JsonParser` is now changed to throw `JsonSyntaxException` in this case. Note that if JsonParser (or Gson) encounter an empty stream, they still return `JsonNull`.
* Support for user-defined streaming type adapters
* continued performance enhancements
* Dropped support for type hierarchy instance creators. We don't expect this to be a problem. We'll also detect fewer errors where multiple type adapters can serialize the same type. With APIs like getNextTypeAdapter, this might actually be an improvement!
* Previous versions first parsed complete document into a DOM-style model (JsonObject or JsonArray) and then bound data against that. Gson 2 does data binding directly from the stream parser.
* Gson 1.7 sets subclass fields when an InstanceCreator returns a subclass when the value is a field of another object. Gson 2.0 sets fields of the requested type only.
* Gson 1.7 versioning never skips the top-level object. Gson 2.0 versioning applies to all objects.
* Gson 1.7 truncates oversized large integers. Gson 2.0 fails on them.
* Gson 2.0 permits integers to have .0 fractions like "1.0".
* Gson 1.7 throws IllegalStateException on circular references. Gson 2.0 lets the runtime throw a StackOverflowError.
* Removed assembly-descriptor.xml and maven pom.xml/pom.properties files from Gson binary jar. This also ensures that jarjar can be run correctly on Gson.
* A number of performance improvements: Using caching of field annotations for speeding up reflection, replacing recursive calls in the parser with a for loop.
* JsonStreamParser: A streaming parser API class to deserialize multiple JSON objects on a stream (such as a pipelined HTTP response)
* Raised the deserialization limit for byte and object arrays and collection to over 11MB from 80KB. See issue 96.
* While serializing, Gson now uses the actual type of a field. This allows serialization of base-class references holding sub-classes to the JSON for the sub-class. It also allows serialization of raw collections. See Issue 155, 156.
* Added a `Gson.toJsonTree()` method that serializes a Java object to a tree of JsonElements. See issue 110.
* Added a `Gson.fromJson(JsonElement)` method that deserializes from a Json parse tree.
* Updated `Expose` annotation to contain parameters serialize and deserialize to control whether a field gets serialized or deserialized. See issue 146.
* Added a new naming policy `LOWER_CASE_WITH_DASHES`
* Default date type adapter is now thread-safe. See Issue 162.
*`JsonElement.toString()` now outputs valid JSON after escaping characters properly. See issue 154.
*`JsonPrimitive.equals()` now returns true for two numbers if their values are equal. All integral types (long, int, short, byte, BigDecimal, Long, Integer, Short, Byte) are treated equivalent for comparison. Similarly, floating point types (double, float, BigDecimal, Double, Float) are treated equivalent as well. See issue 147.
* Fixed bugs in pretty printing. See issue 153.
* If a field causes circular reference error, Gson lists the field name instead of the object value. See issue 118.
* Gson now serializes a list with null elements correctly. See issue 117.
* Fixed issue 121, 123, 126.
* Support user defined exclusion strategies (Feature Request 138).
* Supported custom mapping of field names by making `FieldNamingStrategy` public and allowing `FieldNamingStrategy` to be set in GsonBuilder. See issue 104.
* Added a new GsonBuilder setting `generateNonExecutableJson()` that prefixes the generated JSON with some text to make the output non-executable Javascript. Gson now recognizes this text from input while deserializing and filters it out. This feature is meant to prevent script sourcing attacks. See Issue 42.
* Supported deserialization of sets with elements that do not implement Comparable. See Issue 100
* Supported deserialization of floating point numbers without a sign after E. See Issue 94
* Removed the need to invoke instance creator if a deserializer is registered. See issues 37 and 69.
* Added default support for java.util.UUID. See Issue 79
* Changed `Gson.toJson()` methods to use `Appendable` instead of `Writer`. Issue 52. This requires that clients recompile their source code that uses Gson.
* Includes updated parser for JSON that supports much larger strings. For example, Gson 1.2 failed at parsing a 100k string, Gson 1.2.1 has successfully parsed strings of size 15-20MB. The parser also is faster and consumes less memory since it uses a token match instead of a recursion-based Grammar production match. See Issue 47.
* Gson now supports field names with single quotes ' in addition to double quotes ". See Issue 55.
* Includes bug fixes for issue 46, 49, 51, 53, 54, and 56.