All Versions
36
Latest Version
Avg Release Cycle
133 days
Latest Release
355 days ago

Changelog History
Page 2

  • v2.6

    February 11, 2016

    2016-02-11 GitHub Diff

    • Permit timezones without minutes in the default date adapter.
    • Update reader and writer for RFC 7159. This means that strings, numbers, booleans and null may be top-level values in JSON documents, even if the reader is strict.
    • New setLenient() method on GsonBuilder. This setting impacts the new factory method Gson.newJsonReader().
    • Adapters discovered with @JsonAdapter are now null safe by default.
  • v2.5

    2015-11-24 GitHub Diff

    • Updated minimum JDK version to 1.6
    • Improved Date Deserialization by accepting many date formats
    • 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.
    • Improved debugging information when some exceptions are thrown
  • v2.4

    2015-10-04

    • Drop IOException from TypeAdapter.toJson(). This is a binary-compatible change, but may cause compiler errors where IOExceptions are being caught but no longer thrown. The correct fix for this problem is to remove the unnecessary catch clause.
    • New: Gson.newJsonWriter method returns configured JsonWriter instances.
    • New: @SerializedName now works with AutoValue’s abstract property methods.
    • New: @SerializedName permits alternate names when deserializing.
    • New: JsonWriter#jsonValue writes raw JSON values.
    • New: APIs to add primitives directly to JsonArray instances.
    • New: ISO 8601 date type adapter. Find this in extras.
    • Fix: FieldNamingPolicy now works properly when running on a device with a Turkish locale.
  • v2.3.1

    2014-11-20

    • 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
    • Other smaller bug fixes
  • v2.3

    2014-08-11

    • 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)
    • Many other smaller bug fixes
  • v2.2.4

    2013-05-13

    • Fix internal map (LinkedHashTreeMap) hashing bug.
    • Bug fix (Issue 511)
  • v2.2.3

    2013-04-12

    • Fixes for possible DoS attack due to poor String hashing
  • v2.2.2

    2012-07-02

    • 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.
  • v2.2.1

    2012-05-05

    • Very minor fixes
  • v2.2

    2012-05-05

    • Added getDelegateAdapter in Gson class
    • Fixed a security bug related to denial of service attack with Java HashMap String collisions.