A Java serialization/deserialization library to convert Java Objects into JSON and back
This is technically a minor release rather than a patch release because there is one small API change: a new JsonObject.isEmpty()
method.
final
keyword from private
method by @MaicolAntali in https://github.com/google/gson/pull/2276
testParsingDatesFormattedWithSystemLocale()
, Fix #2199 by @MaicolAntali in https://github.com/google/gson/pull/2287
Full Changelog: https://github.com/google/gson/compare/gson-parent-2.10...gson-parent-2.10.1
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)
Gson.getAdapter
calls by @Marcono1234 in https://github.com/google/gson/pull/2153
TypeToken.getParameterized
arguments by @Marcono1234 in https://github.com/google/gson/pull/2166
JsonArray.set
by @Marcono1234 in https://github.com/google/gson/pull/2170
GsonBuilder.setExclusionStrategies
does not replace existing ones by @Marcono1234 in https://github.com/google/gson/pull/2168
TypeAdapter.toJson
throwing AssertionError for custom IOException by @Marcono1234 in https://github.com/google/gson/pull/2172
JsonObject
Entry.setValue(null)
by @Marcono1234 in https://github.com/google/gson/pull/2167
$Gson$Preconditions.checkNotNull
with Objects.requireNonNull
by @Marcono1234 in https://github.com/google/gson/pull/2180
ReleaseProcess.md
by @Marcono1234 in https://github.com/google/gson/pull/2159
@Ignore
it. by @eamonnmcmanus in https://github.com/google/gson/pull/2203
@since
tags for previously added elements by @Marcono1234 in https://github.com/google/gson/pull/2211
JsonReader.skipValue()
by @Marcono1234 in https://github.com/google/gson/pull/2062
JsonArray.asList
and JsonObject.asMap
view methods by @Marcono1234 in https://github.com/google/gson/pull/2225
release:prepare
by @Marcono1234 in https://github.com/google/gson/pull/2212
GsonVersionDiagnosticsTest
. by @eamonnmcmanus in https://github.com/google/gson/pull/2228
Full Changelog: https://github.com/google/gson/compare/gson-parent-2.9.1...gson-parent-2.10
Object
and JsonElement
deserialization iterative rather than recursive (#1912)codegen
hierarchy (#2099)TypeToken
creation validation (#2072)float
in JsonWriter
(#2130, #2132)Also many small improvements to javadoc.
The minimum supported Java version changes from 6 to 7.
module-info.class
into Multi-Release JAR folder (#2013)GsonBuilder.disableJdkUnsafe()
(#1904)UPPER_CASE_WITH_UNDERSCORES
in FieldNamingPolicy (#2024)Gson.newJsonWriter
ignoring lenient and HTML-safe setting (#1989)FieldNamingPolicy.upperCaseFirstLetter
uppercasing non-letter (#2004)Thanks to our contributors, especially @Marcono1234!
sun.misc
optional (#1993).Gson.excluder()
exposing internal Excluder
class (#1986).RuntimeTypeAdapterFactory
depending on internal Streams
class (#1959).java.sql
optional (#1707).Unsafe
if there is a security manager (#1712).EnumTypeAdapter
now works better when ProGuard has obfuscated enum fields (#1495).