Elliotte Rusty Harold
28344d861d
Clarify handling of non-object omitted fields ( #1169 )
...
While deserializing, a missing entry in JSON results in setting the corresponding field in the object to its default value: null for object types, zero for numeric types, and false for booleans.
2017-10-28 16:41:25 -07:00
Michael Mkwelele
d9249e9c36
Fix README.md grammatical error ( #1175 )
2017-10-19 22:25:35 -07:00
inder123
e38a6ce60d
minor typo
2017-09-29 15:47:51 -07:00
inder123
b46b04d7a3
ToC edit for gradle
2017-09-29 15:46:53 -07:00
inder123
35b3b7596d
Added gradle section
2017-09-29 15:45:51 -07:00
inder123
c5c843510d
gradle snippet
2017-09-29 15:44:15 -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
inder123
a8f7acd618
Update UserGuide.md
2017-09-19 18:57:02 -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
inder123
fbaa708b41
revised steps
2017-09-19 18:39:17 -07:00
inder123
4c3e471589
Upgraded plugin versions ( #1161 )
2017-09-19 18:36:59 -07:00
inder123
500672c80d
Change log for 2.8.2
2017-09-19 18:09:36 -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
Ori Schwartz
f0aa1118e9
Java protobuf uses lower camel for all field names. When using reflection to find the generic type of repeated fields, can't use the user specified formats for field name conversion. ( #1119 )
2017-09-17 23:46:52 -07:00
Jake Wharton
558c13918e
Merge pull request #1158 from naturalwarren/ws_update_proguard
...
Update proguard rules to not warn on sun.misc package.
2017-09-15 12:04:28 -04:00
Warren Smith
9f8ace9ac4
Dont warn on sun.misc package.
2017-09-15 08:18:32 -07:00
Warren Smith
d9cc7bc60b
Make GsonBuilder.create() factory order idempotent. ( #1141 )
2017-08-14 08:56:16 -07:00
Jake Wharton
afcb3815d9
Merge pull request #1134 from tommagnusson/patch-1
...
fix typo in ConstructorConstructor exception
2017-08-03 10:56:25 -04: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
Stefan M
1c09b3f928
Fix well formed exception ( #1105 )
...
The previous exception was styled in the following way:
... ["DATE']...
This commit will fix the different quote marks and replace the " with '
2017-06-23 09:32:04 -07:00
Niv Singer
74e37110e5
Avoid NPE in PostConstructAdapterFactory ( #1103 )
...
* Avoid NPE in PostConstructAdapterFactory
The RawType's Superclass might be null. This happens, for example, when the type is a collection.
* Add test case for NPE in PostConstructAdapterFactory
* Improve the code quality of PostConstructAdapterFactoryTest
* Improve the code quality of PostConstructAdapterFactoryTest
* Improve the code quality of PostConstructAdapterFactoryTest
2017-06-19 18:04:19 -07:00
inder123
3090a7ed2a
Made deepCopy public ( #1091 )
...
* Made deepCopy public
* since 2.8.2
2017-05-31 10:33:37 -07:00
inder123
2a08e3906c
Update CHANGELOG.md
2017-05-31 10:00:24 -07:00
inder123
535bb5d1b9
2.8.1
2017-05-31 09:59:01 -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
sourabh gupta
5848096f3e
Size allocation of StringBuilder ( #1047 )
...
Size allocation of StringBuilder
2017-05-24 15:49:09 -07:00
James Carman
f7012e5865
Adding maven-bundle-plugin. ( #1071 )
2017-05-24 15:25:50 -07:00
Jake Wharton
b58de2f4ae
Merge pull request #1073 from lyubomyr-shaydariv/public-tojson
...
Remove helper methods mentioned in the TODO list
2017-05-02 10:37:11 -04:00
Lyubomyr Shaydariv
eb27d55f49
Remove helper methods mentioned in the TODO list
2017-04-23 15:54:10 +03:00
Jake Wharton
09cbc8073b
Merge pull request #1072 from NightlyNexus/eric/2017.04.22-synthetic
...
Remove need for synthetic accessor methods.
2017-04-22 20:44:27 -05:00
Eric Cochran
3270e8d972
Remove need for synthetic accessor methods.
2017-04-22 17:32:59 -07:00
inder123
5412f21431
Printing more debugging information to help track an invalid JsonAdapter. ( #1068 )
...
Now the thrown exception carries this information:
java.lang.IllegalArgumentException: Invalid attempt to bind an instance of java.lang.Integer as a @JsonAdapter for com.google.gson.functional.JsonAdapterAnnotationOnClassesTest$D. @JsonAdapter value must be a TypeAdapter, TypeAdapterFactory, JsonSerializer or JsonDeserializer.
2017-04-19 17:08:21 -07:00
Michele Vivoda
9a2421997e
negative zero test and fix ( #1069 )
2017-04-19 14:26:36 -07:00
inder123
41e48f7aa3
Update CHANGELOG.md
2017-04-18 11:32:48 -07:00
Mohammad Yasir
92b52d25d8
Performance fix to avoid reflection-based initialization of null key surrogate
2017-04-12 16:11:20 -04:00
Jake Wharton
537639c9e8
Merge pull request #1052 from tvillaluz/patch-1
...
Update GsonDesignDocument.md
2017-03-23 15:15:42 -07:00
Timmy Villaluz
4274e35956
Update GsonDesignDocument.md
2017-03-23 17:58:52 -04:00
Matthew Haughton
3fdedd405b
UserGuide formatting fix ( #1045 )
...
* UserGuide formatting fix
* UserGuide formatting fixes
2017-03-21 11:14:47 -07:00
sourabh gupta
441fa98735
Simplified access of getSimpleName ( #1042 )
...
* Simplified access of getSimpleName
instead of calling getClass.getSimpleName() that will check too many conditions inside , we can make it as final String and use it directly.
* Simplified access of getSimpleName
making string as static
* Simplified access of getSimpleName
Code Review changes
2017-03-20 14:25:52 -07:00
Egor Neliuba
3063136a2c
Fix headers format in the README.md ( #1041 )
2017-03-20 08:40:49 -04:00
Jesse Wilson
423ff04a75
Merge pull request #1037 from guptasourabh/master
...
elimiating code overhead
2017-03-18 15:34:09 -04:00