Skip to content

Releases: google/gson

Gson 2.10.1

06 Jan 17:23
Compare
Choose a tag to compare

This is technically a minor release rather than a patch release because there is one small API change: a new JsonObject.isEmpty() method.

What's Changed: User-Visible Changes

Site Documentation and Maintenance Changes (these were already visible)

Other Changes

New Contributors (thanks!)

Full Changelog: gson-parent-2.10...gson-parent-2.10.1

Gson 2.10

25 Oct 01:29
Compare
Choose a tag to compare

Most important changes

  • Support for serializing and deserializing Java records, on Java ≥ 16. (#2201)

  • Add JsonArray.asList and JsonObject.asMap view methods (#2225)

  • Fix TypeAdapterRuntimeTypeWrapper not detecting reflective TreeTypeAdapter and FutureTypeAdapter (#1787)

  • Improve JsonReader.skipValue() (#2062)

  • Perform numeric conversion for primitive numeric type adapters (#2158)

  • Add Gson.fromJson(..., TypeToken) overloads (#1700)

  • Fix changes to GsonBuilder affecting existing Gson instances (#1815)

  • Make JsonElement conversion methods more consistent and fix javadoc (#2178)

  • Throw UnsupportedOperationException when JsonWriter.jsonValue is not supported (#1651)

  • Disallow JsonObject Entry.setValue(null) (#2167)

  • Fix TypeAdapter.toJson throwing AssertionError for custom IOException (#2172)

  • Convert null to JsonNull for JsonArray.set (#2170)

  • Fixed nullSafe usage. (#1555)

  • Validate TypeToken.getParameterized arguments (#2166)

  • Fix #1702: Gson.toJson creates CharSequence which does not implement toString (#1703)

  • Prefer existing adapter for concurrent Gson.getAdapter calls (#2153)

  • Improve ArrayTypeAdapter for Object[] (#1716)

  • Improve AppendableWriter performance (#1706)

List of all changes

New Contributors

Full Changelog: gson-parent-2.9.1...gson-parent-2.10

Gson 2.9.1

31 Jul 21:39
Compare
Choose a tag to compare
  • Make Object and JsonElement deserialization iterative rather than recursive (#1912)
  • Added parsing support for enum that has overridden toString() method (#1950)
  • Removed support for building Gson with Gradle (#2081)
  • Removed obsolete codegen hierarchy (#2099)
  • Add support for reflection access filter (#1905)
  • Improve TypeToken creation validation (#2072)
  • Add explicit support for float in JsonWriter (#2130, #2132)
  • Fail when parsing invalid local date (#2134)

Also many small improvements to javadoc.

Gson 2.9.0

11 Feb 19:42
Compare
Choose a tag to compare

The minimum supported Java version changes from 6 to 7.

  • Change target Java version to 7 (#2043)
  • Put module-info.class into Multi-Release JAR folder (#2013)
  • Improve error message when abstract class cannot be constructed (#1814)
  • Support EnumMap deserialization (#2071)
  • Add LazilyParsedNumber default adapter (#2060)
  • Fix JsonReader.hasNext() returning true at end of document (#2061)
  • Remove Gradle build support. Build script was outdated and not actively maintained anymore (#2063)
  • Add GsonBuilder.disableJdkUnsafe() (#1904)
  • Add UPPER_CASE_WITH_UNDERSCORES in FieldNamingPolicy (#2024)
  • Fix failing to serialize Collection or Map with inaccessible constructor (#1902)
  • Improve TreeTypeAdapter thread-safety (#1976)
  • Fix Gson.newJsonWriter ignoring lenient and HTML-safe setting (#1989)
  • Delete unused LinkedHashTreeMap (#1992)
  • Make default adapters stricter; improve exception messages (#2000)
  • Fix FieldNamingPolicy.upperCaseFirstLetter uppercasing non-letter (#2004)

Thanks to our contributors, especially @Marcono1234!

Gson 2.8.9

29 Oct 20:43
Compare
Choose a tag to compare
  • Make OSGi bundle's dependency on sun.misc optional (#1993).
  • Deprecate Gson.excluder() exposing internal Excluder class (#1986).
  • Prevent Java deserialization of internal classes (#1991).
  • Improve number strategy implementation (#1987).
  • Fix LongSerializationPolicy null handling being inconsistent with Gson (#1990).
  • Support arbitrary Number implementation for Object and Number deserialization (#1290).
  • Bump proguard-maven-plugin from 2.4.0 to 2.5.1 (#1980).
  • Don't exclude static local classes (#1969).
  • Fix RuntimeTypeAdapterFactory depending on internal Streams class (#1959).
  • Improve Maven build (#1964).
  • Make dependency on java.sql optional (#1707).

Gson 2.8.8

20 Aug 17:04
Compare
Choose a tag to compare
  • Fixed issue with recursive types (#1390).
  • Better behaviour with Java 9+ and Unsafe if there is a security manager (#1712).
  • EnumTypeAdapter now works better when ProGuard has obfuscated enum fields (#1495).