Marcono1234
4dda4ec5ba
Use diamond operator when creating generic instances ( #2104 )
2022-04-17 15:27:21 -07: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
Inderjeet Singh
42e35e9f90
updated oss-parent version to 7 in gson-extras pom.
...
fixed some eclipse warnings.
2012-08-01 20:57:51 +00:00
Jesse Wilson
dc4e43bb23
Permit users to define type adapters for primitive types and strings.
...
Also expose an API to get the field naming strategy.
2012-06-30 02:37:49 +00:00
Jesse Wilson
4cb1b88115
Test for registerTypeHierarchyAdapter() using Date.class
...
Fixes issue 352.
2011-12-29 07:27:33 +00:00
Jesse Wilson
e756608568
Forbid custom serializers for primitive types (so we can avoid boxing in the reflective and array adapters)
2011-09-09 06:26:21 +00:00
Inderjeet Singh
005c93e383
removed unused no-args constructors
2011-03-23 18:48:03 +00:00
Inderjeet Singh
2b1f3eec15
Removed a bunch of unused code and unnecessary else statements.
2010-09-28 13:42:43 +00:00
Joel Leitch
e3af076ff2
Deprecate the FieldNamingStrategy interface and replace it with FieldNamingStrategy2. This is the first step to help make it easy to cache field annotations across all instances of a class, etc.
2010-01-09 22:43:27 +00:00
Inderjeet Singh
b634804533
Ensured that a base class custom serializer is run when the type is specified explicitly during serialization. For all other situations, ensured that the actual type of the object is taken into consideration while serializing. First a custom handler corresponding to the actual type is looked up, then a custom handler for the specified type.
...
Created some serialization specific tests regarding custom serializers. Revised some tests to use toJsonTree for better asserts instead of string matching.
2009-10-08 19:28:53 +00:00
Inderjeet Singh
1da3ef9891
Ensured that a custom handler is not visited during deserialization.
...
Ensured that JsonTreeNavigator can handle null values as children of JsonObject. This is now possible since Gson exposes toJson(JsonElement) method to which the user can pass a JsonElement with null values.
2009-10-06 01:15:28 +00:00
Joel Leitch
8297437610
Reverting r499.
2009-09-23 19:25:50 +00:00
Joel Leitch
c6f762f36b
Fix Warnings
2009-09-23 19:09:01 +00:00
Inderjeet Singh
3b0f8f4340
Removed all the JDK warnings about unused fields in test classes or unused constructors for use by Gson or instanceof calls on parameterized types.
2009-09-23 17:45:16 +00:00
Inderjeet Singh
de713614af
incorporated feedback from code review of r295
2008-12-18 18:59:30 +00:00
Joel Leitch
0d8150fe52
Major restructuring of Primitve type serialization and deserializtion. From the end-user's point of view there should be no difference other than the user can now override the default serialization/deserialization their own custom type adapter (not sure if there is a real use-case out there for this).
...
This restructuring greatly cleans up the code and reduces some complexity; however, there is more that can be done to clean this up (i.e. get rid of "InstanceCreators" for primitive Type Adapters).
2008-11-15 02:26:57 +00:00
Inderjeet Singh
7e360b95e7
Added tests to verify that custom serializer and deserializers for byte[] types works.
2008-11-14 23:55:57 +00:00
Inderjeet Singh
ad1c1a731d
Added more tests in response to Issue 70.
2008-11-14 22:11:12 +00:00
Inderjeet Singh
dfad0a3612
Added tests in response to Issue 70.
2008-11-14 21:59:59 +00:00
Inderjeet Singh
9a69560d9f
During serialization, we now dont call custom serializers the field is null.
...
During deserialization, we do not call custom deserializer if the field is to be set to null. Moreover, changed the logic to set fields to null only if explicitly indicated in the incoming Json. This is different from past behavior where all fields not mentioned in incoming Json were set to null. Now they are set to whatever the default constructor will do.
2008-11-14 20:52:57 +00:00
Inderjeet Singh
cc90a68241
Fixed issue 68 by providing support to override default type adapters for
...
primitive types. Added a visitFieldUsingCustomHandler method to handle this in
the visitors.
2008-10-31 00:19:58 +00:00
Inderjeet Singh
70c7728218
Wrote a test that invokes a custom deserializer for a wrapper primitive type.
2008-10-30 18:26:16 +00:00
Inderjeet Singh
9f5a2086de
updated Gson version to 1.2.2
...
Added a test to ensure that CustomTypeAdapters are not applied automatically
for SubClasses.
2008-10-14 19:37:33 +00:00
Inderjeet Singh
646d94d420
test for issue 58
2008-10-14 18:54:34 +00:00
Inderjeet Singh
add960644a
disabled tests for issue 43 and 44 since those are deferred for a subsequent release.
2008-10-13 19:14:57 +00:00
Joel Leitch
973696cbf5
Tests exposing bug 43 and 44.
2008-09-16 17:53:43 +00:00
Inderjeet Singh
57d1f32de5
moved gson as a project under trunk
2008-09-01 03:13:32 +00:00