Commit Graph

13 Commits

Author SHA1 Message Date
Marcono1234 4dda4ec5ba
Use diamond operator when creating generic instances (#2104) 2022-04-17 15:27:21 -07:00
Marcono1234 b4dab86b10
Make default adapters stricter; improve exception messages (#2000)
* Make default adapters stricter; improve exception messages

* Reduce scope of synchronized blocks

* Improve JsonReader.getPath / getPreviousPath Javadoc
2021-11-01 15:08:04 -07:00
inder123 a6890bbaba
Fixed https://github.com/google/gson/issues/1310 (#1311)
* Fixed https://github.com/google/gson/issues/1310

Also renamed VersionUtils to more readable abstraction JavaVersion
Added support for debian naming convention
Using min supported version (6) as the default if JDK version can't be figured out

* Moved JavaVersion to an internal package
2018-05-09 13:10:08 -07:00
Andrey Mogilev 0aaf5ff408 fix Java9 DateFormat changes (#1211)
* fix Java9 DateFormat changes

* fix Codacy warnings
2017-12-30 00:44:43 +05:30
Gorik bcd52a1fdc Added ISO8601 complete support for date deserialization 2015-11-23 01:11:41 -05:00
Inderjeet Singh e5b3f6368d updated minimum JDK version to 1.6.
Added Overrides for methods implementing an interface.
2015-11-04 18:52:20 -08:00
Jesse Wilson d7fbac0384 Rename TypeAdapter.Factory to TypeAdapterFactory. 2011-12-23 18:27:13 +00:00
Jesse Wilson f602bce9f5 Nice documentation for TypeAdapter. 2011-12-03 19:46:25 +00:00
Jesse Wilson 26ab404599 Cleanup names for TypeAdapters. 2011-12-02 22:57:30 +00:00
Jesse Wilson 7e760143fd Smash together MiniGson and Gson. This changes Gson to be the MiniGson rather than delegating to the MiniGson. It means that the MiniGson objects passed into streaming type adapters are now fully-capable 'Gson' objects.
The most notable impact of this change is that it adds several new public APIs:
 - The TypeAdapter abstract class
 - The TypeAdapter.Factory interface
 - Four new methods on GsonBuilder to register streaming TypeAdapters (via Factory, via Class, via TypeToken, and as a type hierarchy)
 - Three new methods on Gson to lookup streaming TypeAdapters (by type, by class, and to get the next type adapter) 

Still outstanding:
 - Write beautiful prose to document the new APIs above
 - Change GsonBuilder's precedence so that both old and new-style type adapters are registered in one lot
2011-11-20 15:23:08 +00:00
Jesse Wilson 5db4caeec5 A whole bunch of tests for support for null elements.
Fixes bug 369
2011-10-14 03:17:12 +00:00
Jesse Wilson 3f26144165 Fix date adapters to work when run in any time zone. 2011-09-28 17:56:54 +00:00
Jesse Wilson 3b3a60d301 Use new instances of DateTypeAdapter and TimeTypeAdapter for each GSON; this guarantees that the TimeZone and Locale are what they should be 2011-09-26 21:44:08 +00:00