gson-comments/gson
Marcono1234 3e3266cf48
Perform numeric conversion for primitive numeric type adapters (#2158)
* Perform numeric conversion for primitive numeric type adapters

This should probably not be visible to the user unless they use the
non-typesafe `Gson.toJson(Object, Type)` where unrelated number types can
be used, or when malformed generic containers are used. For example a
`List<Byte>` containing a Float.

This change also has the advantage of avoiding `JsonWriter.value(Number)`
for primitive type adapters. That method has some overhead because it needs
to make sure that the value is a valid JSON number. However, for primitive
numbers this check is redundant.

* Don't call `JsonWriter.value(float)` for backward compatibility

* Fix typo in comments
2022-10-04 07:22:26 -07:00
..
src Perform numeric conversion for primitive numeric type adapters (#2158) 2022-10-04 07:22:26 -07:00
bnd.bnd Change target Java version to 7 (#2043) 2021-12-31 07:20:29 -08:00
LICENSE Updating License to contain the full text. 2011-04-12 21:21:39 +00:00
pom.xml Follow-up for record test build changes (#2207) 2022-09-27 23:02:15 -07:00
README.md Add READMEs to Maven modules (#2039) 2021-12-27 10:17:41 -08:00

gson

This Maven module contains the Gson source code. The artifacts created by this module are deployed to Maven Central under the coordinates com.google.code.gson:gson.