Degubi
c5a3f21fba
Refactor JsonParser to statics & fix tests
2019-04-15 22:35:10 -04:00
Degubi
477b3f77e1
Refactor primitives class
2019-04-15 11:08:31 -04:00
Degubi
46d0f58d12
Remove unnecessary explicit else statement
2019-04-05 16:20:06 +02:00
Degubi
3ee3c150ed
Remove boolean wrappers in JsonElement
2019-03-31 21:28:12 +02:00
Degubi
fc63a6af4c
Make sql module dependency transitive ( #1500 )
2019-03-29 09:34:12 -07:00
Manuel Kollus
5370b076e3
Removing 'final' accessor from constructor ( #1501 )
2019-03-28 09:22:36 -07:00
Degubi
8bf2949c29
Remove object based constructors, remove some internal stuff
2019-03-11 10:53:31 -04:00
Jake Wharton
a817604a41
Add test coverage for passing null to JsonPrimitive constuctors
2019-03-11 10:50:22 -04:00
Degubi
bac26b8e42
Optimize array copies
2019-03-05 12:12:04 -05:00
Lorenz Nickel
3c6eea6b7d
Adapt gson/gson/README to match with gson/README.md ( #1472 )
2019-03-03 11:28:00 -08:00
Lorenz Nickel
b75e1bbc79
Code cleanup (Removed spaces) ( #1474 )
...
* Removed double spaces in comments
* Unified comments
* Removed space
* Removed spaces in code
2019-03-03 11:18:06 -08:00
Márton Braun
4d942db168
Update Gson.java documentation to explicitly state behavior for empty strings ( #1464 )
2019-02-17 00:32:43 -08:00
Piet van Dongen
5bbc768fa6
Fix JPMS module setup ( fixes #1315 ) ( #1402 )
...
* Fix JPMS module setup (fixes #1315 )
* Re-added cause to AssertionErrors
2018-10-18 08:49:08 -07:00
Eric Cochran
92b6173791
Deprecate JsonElement.getAsCharacter
2018-07-30 13:44:21 -04:00
Inderjeet Singh
986d3fb2fa
[maven-release-plugin] prepare for next development iteration
2018-05-21 20:08:20 -07:00
Inderjeet Singh
f649e05141
[maven-release-plugin] prepare release gson-parent-2.8.5
2018-05-21 20:08:09 -07:00
joel-leitch
4c685b21a8
Private constructor ( #1324 )
...
* Adding private constructors on Util classes
* Remove obsolete step
2018-05-21 20:04:22 -07:00
inder123
d84e26d80c
Issue 1242: Printing Gson version when throwing AssertionError and IllegalArgumentException ( #1321 )
...
On some versions of Android (probably on some variants of the popular Samsung S4 phone), an older version of Gson is suspected to be bundled in, and gets picked up from the system classpath.
For those versions, the applications that include the latest Gson fail unexpectedly. This debug print will help confirm this issue.
2018-05-17 09:41:21 -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
Inderjeet Singh
446a3bff8d
[maven-release-plugin] prepare for next development iteration
2018-05-01 11:06:37 -07:00
Inderjeet Singh
9fbebdf990
[maven-release-plugin] prepare release gson-parent-2.8.4
2018-05-01 11:06:25 -07:00
inder123
049bf84e68
Using sun.misc.Unsafe only through reflection to avoid binary dependency ( #1306 )
...
If sun.misc.Unsafe not found on Java 9, try field.setAccessible
Also removed exception traces when sun.misc.Unsafe or override are not found
2018-05-01 09:57:45 -07:00
inder123
941363f14c
Added gradle/Idea support ( #1302 )
2018-04-30 09:54:24 -07:00
inder123
1b28ff3cda
Added a test for deserialization of fields using lowercase-dot naming policy ( #1303 )
2018-04-27 18:54:48 -07:00
Leon
ab35f11077
add FieldNamingPolicy.LOWER_CASE_WITH_DOTS ( #1278 )
2018-04-27 18:50:08 -07:00
Inderjeet Singh
7dd379ffe1
[maven-release-plugin] prepare for next development iteration
2018-04-27 15:34:26 -07:00
Inderjeet Singh
4ed639e882
[maven-release-plugin] prepare release gson-parent-2.8.3
2018-04-27 15:34:15 -07:00
Lyubomyr Shaydariv
bdea5b9e99
Removed the executable flag from clearly text files
2018-04-26 10:23:15 +03:00
Inderjeet Singh
4081dbaa6d
Added a test for serialization/deserialization of enum classes with
...
fields
2018-03-17 16:00:46 -07:00
Andrey Mogilev
8445689e4d
Java 9 support: use Unsafe-based reflection in Java 9+ ( #1218 )
...
* Java 9 support: use Unsafe-based reflection in Java 9+
fixes "illegal reflective access" warnings and exceptions
* fix Codacy warnings
* improve code quality based on PR review
* improve code quality based on PR review
* fix Codacy warning
* improve code quality based on PR review
* inlined createReflectionAccessor method
2018-01-04 00:38:50 +05:30
Andrey Mogilev
0aaf5ff408
fix Java9 DateFormat changes ( #1211 )
...
* fix Java9 DateFormat changes
* fix Codacy warnings
2017-12-30 00:44:43 +05:30
Anirudh Ramanan
3bf1967c0a
Optimised the create() call for Excluder TypeAdapterFactory ( #1199 )
...
* optimized the create() method, excludeClass used to get called two times, changed it to one
* fixed the create() method, and added support to disableAnonymousAndLocalClassSerialization
* peek only once
* enable anonymous and local class serialization
* bugfix
* removed the method, will raise it as a separate PR
2017-12-28 06:03:45 +05:30
michaelsavich
7ddac52748
Java 9 module ( #1179 )
...
* Add module-info.java
* Exclude module-info.java by default
2017-12-26 21:58:19 +05:30
Trung Do
855f0493d0
Fix a small typo ( #1183 )
2017-10-31 11:43:24 -07:00
Andrey Mogilev
b1fb9ca9a1
fix issue #1107 : resolve element type in wildcard collection types ( #1146 )
...
* fix issue #1107 : resolve element type in wildcard collection types
* fix Codacy warnings
* fix Codacy warnings
2017-09-21 17:50:41 -07:00
Warren Smith
08bbb226f1
Add newBuilder() API ( #1142 )
...
* Add Gson.newBuilder API.
* Remove redundant test.
* Address Codacy comments.
* Reduce visibility of GsonBuilder constructor.
2017-09-20 18:53:10 -07:00
Inderjeet Singh
c0b50ba3a3
[maven-release-plugin] prepare for next development iteration
2017-09-19 18:41:44 -07:00
Inderjeet Singh
d90f63dc88
[maven-release-plugin] prepare release gson-parent-2.8.2
2017-09-19 18:41:34 -07:00
Nels Beckman
ddcd6aea7d
Update fromJson Javadoc. ( #1151 )
...
For the string-based fromJson() method, mention that the result will be null if the given string is empty.
2017-09-18 00:08:22 -07:00
Lyubomyr Shaydariv
7a9fd5962d
Fixed DefaultDateTypeAdapter nullability issue and JSON primitives contract ( #1100 )
...
* Fixed DefaultDateTypeAdapter nullability issue and JSON primitives contract
Regression in:
* b8f616c939
- Migrate DefaultDateTypeAdapter to streaming adapter (#1070 )
Bug reports:
* https://github.com/google/gson/issues/1096 - 2.8.1 can't serialize and deserialize date null (2.8.0 works fine)
* https://github.com/google/gson/issues/1098 - Gson 2.8.1 DefaultDateTypeAdapter is not null safe.
* Fixed DefaultDateTypeAdapter nullability on write
2017-09-17 23:49:13 -07:00
Warren Smith
d9cc7bc60b
Make GsonBuilder.create() factory order idempotent. ( #1141 )
2017-08-14 08:56:16 -07:00
Tom Magnusson
68cf8fdc95
fix typo in ConstructorConstructor exception
2017-08-03 09:28:31 -04:00
Andrey Mogilev
03a72e752e
Fix StackOverflowError on resolving types with TypeVariable recursion ( #1128 )
...
* Fix StackOverflowError on resolving types with TypeVariable recursion
Sample failing code:
private static class TestType<X> {
TestType<? super X> superType;
}
...
new Gson().getAdapter(TestType.class);
* fix build errors
2017-07-31 10:50:29 -07:00
Igor Mysak
ee691fba43
fix javaDoc ( #1122 )
2017-07-21 10:12:25 -07:00
inder123
3090a7ed2a
Made deepCopy public ( #1091 )
...
* Made deepCopy public
* since 2.8.2
2017-05-31 10:33:37 -07:00
Mike
ada597e69a
value(double) can write NaN and infinite values when lenient, as value(Number) does ( #1093 )
...
* Added test which shows that lenient JsonWriter fails writing infinite primitive doubles, but does not fail writing boxed doubles, as stated in #1090 .
* Fixed JsonWriter#value(double) to write infinite and NaN values when lenient, as JsonWriter#value(Number) does. (fixes #1090 )
2017-05-31 09:50:44 -07:00
Inderjeet Singh
0aaef0fd1b
[maven-release-plugin] prepare for next development iteration
2017-05-30 18:38:01 -07:00
Inderjeet Singh
3e74bb47d1
[maven-release-plugin] prepare release gson-parent-2.8.1
2017-05-30 18:37:51 -07:00
Lyubomyr Shaydariv
b8f616c939
Migrate DefaultDateTypeAdapter to streaming adapter ( #1070 )
2017-05-30 18:12:50 -07:00
Andrey Mogilev
a300148003
Fix StackOverflowError on resolving recursive types by collapsing chains of type bounds ( #1075 )
...
* Fixes StackOverflowError on resolving recursive types.
See Issue #440 , Issue #603 , tests.
* fix 'codacy' coding style warnings
* added copyright header
2017-05-30 17:47:04 -07:00