PackageTrack
Sign in Get early access

com.google.code.gson:gson-parent

2.14.0 #518 most downloaded on Maven Central google/gson

What this package is like to depend on

Last release 4 months ago

23 Apr 2026

Release timing varies

gaps range from 2 weeks to 1.4 years

Nearly every release is documented

notes for 24 of 25 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

26 releases · first in 2016

3 releases in the last 12 months

see the full history below

Release timeline

26 releases · Feb 2016 to Apr 2026
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 26
  1. 2.14.0 23 Apr 2026
    Release notes

    What's Changed

    • Add type adapters for java.time classes by @eamonnmcmanus in #2948

      When the java.time API is available, Gson automatically can read and write instances of classes like Instant and Duration. The format it uses essentially freezes the JSON representation that ReflectiveTypeAdapterFactory established by default, based on the private fields of java.time classes. That's not a great representation, but it is understandable. Changing it to anything else would break compatibility with systems that are expecting the current format.

      With this change, Gson no longer tries to access private fields of these classes using reflection. So it is no longer necessary to run with --add-opens for these classes on recent JDKs.

    • Remove com.google.gson.graph by @eamonnmcmanus in #2990.

      This package was not part of any released artifact and depended on Gson internals in potentially problematic ways.

    • Validate that strings being parsed as integers consist of ASCII characters by @eamonnmcmanus in #2995

      Previously, strings could contain non-ASCII Unicode digits and still be parsed as integers. That's inconsistent with how JSON numbers are treated.

    • Fix duplicate key detection when first value is null by @andrewstellman in #3006

      This could potentially break code that was relying on the incorrect behaviour. For example, this JSON string was previously accepted but will no longer be: {"foo": null, "foo": bar}.

    • Remove Serializable from internal Type implementation classes. by @eamonnmcmanus in #3011

      The nested classes ParameterizedTypeImpl, GenericArrayTypeImpl, and WildcardTypeImpl in GsonTypes are implementations of the corresponding types (without Impl) in java.lang.reflect. For some reason, they were serializable, even though the java.lang.reflect implementations are not. Having unnecessarily serializable classes could conceivably have been a security problem if they were part of a larger exploit using serialization. (We do not consider this a likely scenario and do not suggest that you need to update Gson just to get this change.)

    • Add LegacyProtoTypeAdapterFactory. by @eamonnmcmanus in #3014

      This is not part of any released artifact, but may be of use when trying to fix code that is currently accessing the internals of protobuf classes via reflection.

    • Make AppendableWriter do flush and close if delegation object supports by @MukjepScarlet in #2925

    Other less visible changes

    New Contributors

    Full Changelog: gson-parent-2.13.2...gson-parent-2.14.0

    Open source →
    Release notes

    Gson 2.14.0 Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  2. 2.13.2 10 Sep 2025
    Release notes

    The main changes in this release are just newer dependencies.

    What's Changed

    • Improved packaging of JPMS module declaration in Gson jar
      This fixes an issue where Eclipse and VS Code users could not refer to the Gson module name com.google.gson. See issue #2679.
    • Remove internal class GsonPreconditions by @Marcono1234 in #2879
    • Switch to using central-publishing-maven-plugin by @eamonnmcmanus in #2900

    New Contributors

    Full Changelog: gson-parent-2.13.1...gson-parent-2.13.2

    Open source →
    Release notes

    Gson 2.13.2

    Compare

    Choose a tag to compare

    Open source →
  3. 2.13.2-rc1 10 Sep 2025 pre-release

    Nothing published for this version

  4. 2.13.1 24 Apr 2025
    Release notes

    What's Changed

    • Give FieldNamingStrategy the ability to return multiple String names by @mfriesen in #2776
    • Remove outdated android-proguard-example by @Goooler in #2843
    • Adjust Troubleshooting Guide ProGuard / R8 section by @Marcono1234 in #2844
    • Update dependencies, including the problematic com.google.errorprone:error_prone_annotations:2.37.0.

    New Contributors

    Full Changelog: gson-parent-2.13.0...gson-parent-2.13.1

    Open source →
    Release notes

    Gson 2.13.1

    Compare

    Choose a tag to compare

    Open source →
  5. 2.13.0 11 Apr 2025
    Release notes

    What's Changed

    • A bug in deserializing collections has been fixed. Previously, if you did something like this:

      gson.fromJson(jsonString, new TypeToken<ImmutableList<String>>() {})
      

      then the inferred type would be ImmutableList<String>, but Gson actually gave you an ArrayList<String>. Usually that would lead to an immediate ClassCastException, but in some circumstances the code might sometimes succeed despite the wrong type. Now you will see an exception like this:

      com.google.gson.JsonIOException: Abstract classes can't be instantiated!
      Adjust the R8 configuration or register an InstanceCreator or a TypeAdapter for this type.
      Class name: com.google.common.collect.ImmutableList
      

      because Gson now really is trying to create an ImmutableList through its constructor, but that isn't possible.
      Either change the requested type (in the TypeToken) to List<String>, or register a TypeAdapter or JsonDeserializer for ImmutableList.

    • The internal classes $Gson$Types and $Gson$Preconditions have been renamed to remove the $ characters. Since these are internal classes (as signaled not only by the package name but by the $ characters), client code should not be affected. If your code was depending on these classes then we suggest making a copy of the class (subject to the license) rather than depending on the new names.

    Full Changelog: gson-parent-2.12.1...gson-parent-2.13.0

    Open source →
    Release notes

    Gson 2.13.0

    Compare

    Choose a tag to compare

    Open source →
  6. 2.12.1 30 Jan 2025
    Release notes

    The only difference between this release and 2.12.0 is that OSGi declarations in the Gson jar now specify that com.google.errorprone.annotations is an optional dependency, not a required one. If you do not use OSGi then there is no effective change.

    Open source →
    Release notes

    Gson 2.12.1

    Compare

    Choose a tag to compare

    Open source →
  7. 2.12.0 27 Jan 2025
    Release notes

    What's Changed

    The biggest change is that we no longer support Java 7. People who still need to run on Java 7 will need to use an earlier version of Gson.

    Other changes:

    • Allow registering adapters for JsonElement again by @Marcono1234 in #2789
    • Add nesting limit for JsonReader by @Marcono1234 in #2588
    • Add @CheckReturnValue to our packages. by @cpovirk in #2693
    • Add NullSafeTypeAdapter to prevent TypeAdapter.nullSafe() from returning nested null-safe type adapters (#2729) by @lyubomyr-shaydariv in #2731
    • Support Properties subclasses in GsonTypes.getMapKeyAndValueTypes by @panic08 in #2758
    • Enforce rawType to be a Class in ParameterizedTypeImpl by @panic08 in #2759
    • Remove AccessController usage for enum adapter by @Marcono1234 in #2704
    • Fix typeArguments array not being cloned when resolving ParameterizedType with changed owner by @TBlueF in #2706
    • Remove duplicated declaration of required OSGi execution environment by @HannesWell in #2711
    • Move bnd.bnd file configuration into 'bnd' element of bnd-maven-plugin by @HannesWell in #2712
    • Move enum and JsonElement adapter classes to separate class files by @Marcono1234 in #2727
    • EnumTypeAdapter constructor optimization by @esaulpaugh in #2734
    • OSGi / bnd: Remove the self-Import of gson.annotations by @chrisrueger in #2735

    New Contributors

    Full Changelog: gson-parent-2.11.0...gson-parent-2.12.0

    Open source →
    Release notes

    Gson 2.12.0

    Compare

    Choose a tag to compare

    Open source →
  8. 2.11.0 19 May 2024
    Release notes

    Most important changes

    • Added default ProGuard / R8 rules (@Marcono1234, #2397, #2420; @sgjesse, #2448; @sfreilich)
      If you are using ProGuard or R8 (for example for Android projects) you might not need any special Gson configuration anymore if your classes have a no-args constructor and use @SerializedName for their fields.
    • On Android, Gson now requires API level 21 or newer
    • Added new Strictness API (@marten-voorberg & fellow students, #2437)
      Some of Gson's API is still lenient by default, but you can now use the newly added methods GsonBuilder#setStrictness, JsonReader#setStrictness and JsonWriter#setStrictness with Strictness.STRICT to override this behavior and to instead strictly adhere to the JSON specification when parsing.
    • New FormattingStyle class to allow configuring line breaks in JSON output (@mihnita, #2231)
      Can be set using GsonBuilder#setFormattingStyle and JsonWriter#setFormattingStyle.
    • TypeToken can no longer capture type variables by default (@Marcono1234, #2376)
      This was previously a common source of issues. The newly thrown exception refers to a Troubleshooting Guide article which explains this in more detail and provides suggestions for updating affected code.
    • Added serialization support for anonymous and local classes with a custom adapter (@Marcono1234, #2498)
      This affects for example List implementations returned by libraries such as Guava which are implemented as anonymous class, which were previously serialized as null. Anonymous and local classes without custom adapter will still be serialized as null.
    • Added dependency on com.google.errorprone:error_prone_annotations
      Your project can use Maven or Gradle dependency exclusions to remove the transitive error_prone_annotations dependency from Gson. Or if you are manually maintaining dependencies as JARs in your project you can omit error_prone_annotations. And it should still work correctly.
      But Gson itself does declare it as a required dependency, and if you don't perform any custom configuration, then Maven or Gradle will by default try to download and use it.
    • Many exception messages now refer to the Troubleshooting Guide (@Marcono1234, #2357)
      Feedback regarding the Troubleshooting Guide is appreciated!
    • Officially documented that JVM languages other than Java might not be fully supported, see the README.
    • Guarantee that JsonElement#toString produces JSON output (@Marcono1234, #2659)

    Other changes

    Bug fixes

    • Fixed incorrect JsonPrimitive#equals results for large BigInteger values (@MaicolAntali, #2311)
    • Fixed incorrect JsonPrimitive#equals results for large BigDecimal values (@MaicolAntali, #2364)
    • Fixed JsonReader throwing NumberFormatException instead of MalformedJsonException for malformed Unicode escape sequences (@MaicolAntali, #2337)
    • Fixed TypeToken#getParameterized returning bogus ParameterizedType for non-generic types (@Marcono1234, #2447)
    • Fixed Java Record adapter not working for GraalVM Native Image (@eamonnmcmanus, #2465)
    • Fixed JsonWriter#name not throwing exception when no JSON object is currently being written (@shivam-sehgal, #2475; @Marcono1234, #2476)
    • Fixed Gson#getDelegateAdapter not working properly for @JsonAdapter (@Marcono1234, #2435)
      Note that null is now not allowed as skipPast value anymore, which was previously allowed but undocumented.
    • Fixed GsonBuilder not rejecting type adapters for Object and JsonElement, whose default adapters cannot be overridden (@sachinp97; #2479)
    • Fixed no limits being enforced when deserializing BigDecimal and BigInteger (@Marcono1234, #2510)
      The new limits prevent potential performance problems when user code uses the deserialized numbers. Gson itself was and is not affected by these performance problems. The limits should be high enough to not cause issues for most use cases, but feedback is appreciated.
    • Fixed GsonBuilder#setDateFormat not rejecting invalid date formats (@Carpe-Wang, #2538)
    • Fixed GsonBuilder#setDateFormat not rejecting invalid date styles (@Marcono1234, #2545)
    • Fixed GsonBuilder#setDateFormat ignoring partial DEFAULT style (@Marcono1234, #2556)
    • Fixed TypeToken#isAssignableFrom throwing AssertionError in some cases (@Marcono1234, #2544)
    • Fixed date adapters not restoring time zone after parsing (@Carpe-Wang, #2549)
    • Fixed TypeToken#equals erroneously returning false for equal generic type parameters in some cases (@d-william, #2599)
    • Fixed incorrect inherited URLs in pom.xml (@Marcono1234, #2351)

    Performance improvements

    Gson maintenance

    GitHub repository

    Other


    Many thanks to @Marcono1234 for drafting these release notes.

    Open source →
    Release notes

    Gson 2.11.0

    Compare

    Choose a tag to compare

    Open source →
  9. 2.10.1 06 Jan 2023
    Release notes

    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

    Open source →
    Release notes

    Gson 2.10.1

    Compare

    Choose a tag to compare

    Open source →
  10. 2.10 25 Oct 2022
    Release notes

    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

    Open source →
    Release notes
    • Support for serializing and deserializing Java records, on Java ≥ 16. (https://github.com/google/gson/pull/2201)
    • Add JsonArray.asList and JsonObject.asMap view methods (https://github.com/google/gson/pull/2225)
    • Fix TypeAdapterRuntimeTypeWrapper not detecting reflective TreeTypeAdapter and FutureTypeAdapter (https://github.com/google/gson/pull/1787)
    • Improve JsonReader.skipValue() (https://github.com/google/gson/pull/2062)
    • Perform numeric conversion for primitive numeric type adapters (https://github.com/google/gson/pull/2158)
    • Add Gson.fromJson(..., TypeToken) overloads (https://github.com/google/gson/pull/1700)
    • Fix changes to GsonBuilder affecting existing Gson instances (https://github.com/google/gson/pull/1815)
    • Make JsonElement conversion methods more consistent and fix javadoc (https://github.com/google/gson/pull/2178)
    • Throw UnsupportedOperationException when JsonWriter.jsonValue is not supported (https://github.com/google/gson/pull/1651)
    • Disallow JsonObject Entry.setValue(null) (https://github.com/google/gson/pull/2167)
    • Fix TypeAdapter.toJson throwing AssertionError for custom IOException (https://github.com/google/gson/pull/2172)
    • Convert null to JsonNull for JsonArray.set (https://github.com/google/gson/pull/2170)
    • Fixed nullSafe usage. (https://github.com/google/gson/pull/1555)
    • Validate TypeToken.getParameterized arguments (https://github.com/google/gson/pull/2166)
    • Fix #1702: Gson.toJson creates CharSequence which does not implement toString (https://github.com/google/gson/pull/1703)
    • Prefer existing adapter for concurrent Gson.getAdapter calls (https://github.com/google/gson/pull/2153)
    • Improve ArrayTypeAdapter for Object[] (https://github.com/google/gson/pull/1716)
    • Improve AppendableWriter performance (https://github.com/google/gson/pull/1706)
    Open source →
    Release notes

    Gson 2.10

    Compare

    Choose a tag to compare

    Open source →
  11. 2.9.1 31 Jul 2022
    Release notes
    • Make Object and JsonElement deserialization iterative rather than recursive (https://github.com/google/gson/pull/1912)
    • Added parsing support for enum that has overridden toString() method (https://github.com/google/gson/pull/1950)
    • Removed support for building Gson with Gradle (https://github.com/google/gson/pull/2081)
    • Removed obsolete codegen hierarchy (https://github.com/google/gson/pull/2099)
    • Add support for reflection access filter (https://github.com/google/gson/pull/1905)
    • Improve TypeToken creation validation (https://github.com/google/gson/pull/2072)
    • Add explicit support for float in JsonWriter (https://github.com/google/gson/pull/2130, https://github.com/google/gson/pull/2132)
    • Fail when parsing invalid local date (https://github.com/google/gson/pull/2134)

    Also many small improvements to javadoc.

    Open source →
    Release notes

    Gson 2.9.1

    Compare

    Choose a tag to compare

    Open source →
  12. 2.9.0 11 Feb 2022
    Release notes

    The minimum supported Java version changes from 6 to 7.

    • Change target Java version to 7 (https://github.com/google/gson/pull/2043)
    • Put module-info.class into Multi-Release JAR folder (https://github.com/google/gson/pull/2013)
    • Improve error message when abstract class cannot be constructed (https://github.com/google/gson/pull/1814)
    • Support EnumMap deserialization (https://github.com/google/gson/pull/2071)
    • Add LazilyParsedNumber default adapter (https://github.com/google/gson/pull/2060)
    • Fix JsonReader.hasNext() returning true at end of document (https://github.com/google/gson/pull/2061)
    • Remove Gradle build support. Build script was outdated and not actively maintained anymore (https://github.com/google/gson/pull/2063)
    • Add GsonBuilder.disableJdkUnsafe() (https://github.com/google/gson/pull/1904)
    • Add UPPER_CASE_WITH_UNDERSCORES in FieldNamingPolicy (https://github.com/google/gson/pull/2024)
    • Fix failing to serialize Collection or Map with inaccessible constructor (https://github.com/google/gson/pull/1902)
    • Improve TreeTypeAdapter thread-safety (https://github.com/google/gson/pull/1976)
    • Fix Gson.newJsonWriter ignoring lenient and HTML-safe setting (https://github.com/google/gson/pull/1989)
    • Delete unused LinkedHashTreeMap (https://github.com/google/gson/pull/1992)
    • Make default adapters stricter; improve exception messages (https://github.com/google/gson/pull/2000)
    • Fix FieldNamingPolicy.upperCaseFirstLetter uppercasing non-letter (https://github.com/google/gson/pull/2004)
    Open source →
  13. 2.8.9 29 Oct 2021
    Release notes
    • Make OSGi bundle's dependency on sun.misc optional (https://github.com/google/gson/pull/1993).
    • Deprecate Gson.excluder() exposing internal Excluder class (https://github.com/google/gson/pull/1986).
    • Prevent Java deserialization of internal classes (https://github.com/google/gson/pull/1991).
    • Improve number strategy implementation (https://github.com/google/gson/pull/1987).
    • Fix LongSerializationPolicy null handling being inconsistent with Gson (https://github.com/google/gson/pull/1990).
    • Support arbitrary Number implementation for Object and Number deserialization (https://github.com/google/gson/pull/1290).
    • Bump proguard-maven-plugin from 2.4.0 to 2.5.1 (https://github.com/google/gson/pull/1980).
    • Don't exclude static local classes (https://github.com/google/gson/pull/1969).
    • Fix RuntimeTypeAdapterFactory depending on internal Streams class (https://github.com/google/gson/pull/1959).
    • Improve Maven build (https://github.com/google/gson/pull/1964).
    • Make dependency on java.sql optional (https://github.com/google/gson/pull/1707).
    Open source →
  14. 2.8.8 20 Aug 2021
    Release notes
    • Fixed issue with recursive types (https://github.com/google/gson/issues/1390).
    • Better behavior with Java 9+ and Unsafe if there is a security manager (https://github.com/google/gson/pull/1712).
    • EnumTypeAdapter now works better when ProGuard has obfuscated enum fields (https://github.com/google/gson/pull/1495).
    Open source →
  15. 2.8.7 24 May 2021
    Release notes
    • Fixed ISO8601UtilsTest failing on systems with UTC+X.
    • Improved javadoc for JsonStreamParser.
    • Updated proguard.cfg (https://github.com/google/gson/pull/1693).
    • Fixed IllegalStateException in JsonTreeWriter (https://github.com/google/gson/issues/1592).
    • Added JsonArray.isEmpty() (https://github.com/google/gson/pull/1640).
    • Added new test cases (https://github.com/google/gson/pull/1638).
    • Fixed OSGi metadata generation to work on JavaSE < 9 (https://github.com/google/gson/pull/1603).
    Open source →
  16. 2.8.6 04 Oct 2019
    Release notes

    2019-10-04 GitHub Diff

    • Added static methods JsonParser.parseString and JsonParser.parseReader and deprecated instance method JsonParser.parse
    • Java 9 module-info support
    Open source →
  17. 2.8.5 22 May 2018
    Release notes

    2018-05-21 GitHub Diff

    • Print Gson version while throwing AssertionError and IllegalArgumentException
    • Moved utils.VersionUtils class to internal.JavaVersion. This is a potential backward incompatible change from 2.8.4
    • Fixed issue https://github.com/google/gson/issues/1310 by supporting Debian Java 9
    Open source →
  18. 2.8.4 01 May 2018
    Release notes

    2018-05-01 GitHub Diff

    • Added a new FieldNamingPolicy, LOWER_CASE_WITH_DOTS that maps JSON name someFieldName to some.field.name
    • Fixed issue https://github.com/google/gson/issues/1305 by removing compile/runtime dependency on sun.misc.Unsafe
    Open source →
  19. 2.8.3 27 Apr 2018
    Release notes

    2018-04-27 GitHub Diff

    • Added a new API, GsonBuilder.newBuilder() that clones the current builder
    • Preserving DateFormatter behavior on JDK 9
    • Numerous other bugfixes
    Open source →
  20. 2.8.2 20 Sep 2017
    Release notes

    2017-09-19 GitHub Diff

    • Introduced a new API, JsonElement.deepCopy()
    • Numerous other bugfixes
    Open source →
  21. 2.8.1 31 May 2017
    Release notes

    2017-05-30 GitHub Diff

    • New: JsonObject.keySet()
    • @JsonAdapter annotation can now use JsonSerializer and JsonDeserializer as well.
    Open source →
  22. 2.8.0 27 Oct 2016

    Nothing published for this version

  23. 2.7 14 Jun 2016
    Release notes

    2016-06-14 GitHub Diff

    • Added support for JsonSerializer/JsonDeserializer in @JsonAdapter annotation
    • Exposing Gson properties excluder(), fieldNamingStrategy(), serializeNulls(), htmlSafe()
    • Added JsonObject.size() method
    • Added JsonWriter.value(Boolean value) method
    • Using ArrayDeque, ConcurrentHashMap, and other JDK 1.6 features
    • Better error reporting
    • Plenty of other bug fixes
    Open source →
  24. 2.6.2 27 Feb 2016
    Release notes

    2016-02-26 GitHub Diff

    • Fixed an NPE bug with @JsonAdapter annotation
    • Added back OSGI manifest
    • Some documentation typo fixes
    Open source →
  25. 2.6.1 12 Feb 2016
    Release notes

    2016-02-11 GitHub Diff

    • Fix: The 2.6 release targeted Java 1.7, but we intend to target Java 1.6. The 2.6.1 release is identical to 2.6, but it targets Java 1.6.
    Open source →
  26. 2.6 11 Feb 2016
    Release notes

    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.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive