Inderjeet Singh
b51ffc1060
Removed eclipse warnings about missing overrides and declared exceptions that are never thrown.
2011-03-24 20:08:56 +00:00
Inderjeet Singh
13dc7b6f02
Made ObjectNavigator a reusable object. We now use just one instance of ObjectNavigator instead of creating one for each field/object.
2011-03-24 18:41:45 +00:00
Inderjeet Singh
b819307de8
refactored the field navigation using reflection out of ObjectNavigator.
2011-03-24 18:28:23 +00:00
Inderjeet Singh
005c93e383
removed unused no-args constructors
2011-03-23 18:48:03 +00:00
Inderjeet Singh
6d3e0e92a5
Added a cache for no-args constructors to avoid expensive reflection everytime an object needs to be instantiated.
2011-03-23 18:31:39 +00:00
Joel Leitch
861e047a62
Create an "internals" package for classes that we do not want to share, but is needed across multiple pacakges.
...
As well, move non-Gson specific classes, such as Preconditions, to this new "internals" package.
2011-03-21 22:30:35 +00:00
Jesse Wilson
657688ca79
Test that the date format is honored, even in a collection.
...
http://code.google.com/p/google-gson/issues/detail?id=230
2011-03-21 22:10:33 +00:00
Jesse Wilson
e96b241556
Test that we can serialize classes whose fields are concrete collections.
2011-03-21 21:49:38 +00:00
Joel Leitch
279c0e87ed
Update Precondition checks and have it throw a NPE instead.
2011-03-16 07:23:44 +00:00
Joel Leitch
7b223a8983
Adding JavaDoc to the enableComplexMapKeySerialization method on GsonBuilder.
2011-03-16 07:05:24 +00:00
Joel Leitch
a9507250f9
Add test for multiple calls to register complex map key serialization.
2011-03-15 15:41:19 +00:00
Joel Leitch
ba0cd254a9
Clean up warnings.
2011-03-15 15:38:17 +00:00
Joel Leitch
e57ef0908b
Add method to GsonBuilder to enable complex key serialization of maps.
2011-03-15 15:37:41 +00:00
Inderjeet Singh
0c35edab65
Fixed the bug where copyOf() for a ParameterizedTypeHandlerMap was failing when hierarchical type adapters for a sub class and its base class were present.
...
Fixed previously broken tests to verify the behavior that a hierarchical type adapter for a sub-class can be registered after registering a hierarchical type adapter for the base-class. The vice-versa is not allowed as it would result in hiding the sub-class hierarchical type adapter.
2011-03-14 23:22:50 +00:00
Jesse Wilson
912add0779
(Failing) test cases for registering competing types.
2011-03-14 22:14:35 +00:00
Jesse Wilson
ef7bd4c999
Don't document an API that we don't offer!
2011-03-14 21:50:14 +00:00
Inderjeet Singh
b489f4fb01
marked default type adapters as final classes
2011-03-11 22:20:39 +00:00
Inderjeet Singh
e26a6d5c18
removed the wrapping (regarding exception handling) of some primitive deserializers (numbers and boolean).
...
Added a number of additional tests that cover the cases of attempts to deserialize JsonObjects or arrays as primitives that must fail.
2011-03-11 22:14:18 +00:00
Jesse Wilson
43137b6b4f
Fix unsafe allocations on Android
2011-03-11 00:44:15 +00:00
Inderjeet Singh
28567508ea
Corrected Javadocs to indicate that NumberFormatException gets thrown instead of ClassCastException while attempting to convert a JsonPrimitive to a number.
2011-03-11 00:14:49 +00:00
Inderjeet Singh
baf9591d3b
Made constructors package private for package private classes.
2011-03-10 23:55:16 +00:00
Inderjeet Singh
4e4f9b3a69
Preconditions.checkState() now throws IllegalStateException instead of IllegalArgumentException. This will potentiallly break backwards compatibility.
...
Removed unhelpful message while constructing exceptions.
2011-03-10 23:19:58 +00:00
Inderjeet Singh
52288d7127
rawtypes -> unchecked
...
Fixed spurious eclipse warnings on deprecation, missing classes or parameters, etc.
2011-02-24 22:47:55 +00:00
Inderjeet Singh
4be9767a28
removed unused imports
2011-02-24 20:18:03 +00:00
Inderjeet Singh
54a2444fa9
Updated maven configuration to ensure that 'mvn install' creates javadoc and sources jars as well.
2011-02-24 00:07:01 +00:00
Inderjeet Singh
d0b311747c
marked project files as UTF-8
2011-02-24 00:06:45 +00:00
Jesse Wilson
3d006c90a2
equals & hashCode for subclasses of JsonElement.
...
Resolves issue 64.
2011-02-15 00:14:20 +00:00
Joel Leitch
4c41b11fce
Comments from r723.
2011-02-14 22:26:17 +00:00
Joel Leitch
69661216a3
Minor clean-up of warnings (in 1.5) and added new test for non-Empty maps.
2011-02-11 18:22:58 +00:00
Joel Leitch
451a9dbe66
Add ability to allocate memory for an object without the use of the default constructor.
2011-02-11 18:22:07 +00:00
Jesse Wilson
b649f2768c
Support unquoted single word strings in lenient mode!
...
Fixes issue 282.
2011-02-10 01:36:27 +00:00
Jesse Wilson
6e81cfdbb4
Locale-awareness for date parsing and formatting:
...
- always format in en_US for best interchange
- always parse in en_US, system locale and ISO-8601
2011-02-10 01:06:22 +00:00
Inderjeet Singh
4fc0577933
Split up benchmarks into specific types for serialization and deserialization.
2011-02-06 02:32:20 +00:00
Joel Leitch
114633fbf9
Provide a means to add serialization or deserialization specific exclusion strategies.
2011-02-04 03:09:41 +00:00
Inderjeet Singh
ea48a1debf
Fixed issue 175 by adding default type adapters for StringBuilder and StringBuffer.
2011-01-31 23:14:02 +00:00
Inderjeet Singh
50a1191f90
Updated JDK version to match caliper's
2011-01-31 18:35:11 +00:00
Inderjeet Singh
7b3cb27ee5
Added maven dependency to caliper in pom.xml
2011-01-27 01:18:52 +00:00
Inderjeet Singh
1ad0489b84
Initial version of Gson benchmark using Caliper
2011-01-25 19:20:20 +00:00
Inderjeet Singh
a09c3ab1c5
Added tests to validate issue 272. The tests currently pass so it is not a valid bug.
2011-01-24 22:40:42 +00:00
Joel Leitch
56aa828350
Minor clean-up in Gson class.
2011-01-22 22:43:43 +00:00
Joel Leitch
fb7bd7b1b7
Deprecate the old FieldNamingStrategy interface and open up the FieldNamingStrategy2 instead to take its place.
2011-01-22 22:27:30 +00:00
Joel Leitch
b883f8f4aa
Add new "Mode" enum and carry mode through Gson so exclusion strategies know whether it is currently serializing or deserializing.
...
Deprecate old ExclusionStrategy code since this new approach is more powerful.
2011-01-22 22:15:06 +00:00
Inderjeet Singh
2b9f81e8b5
Registering default type hierarchy adapters first and allow users to override them.
...
This allows the default EnumTypeAdapter to be overridden for a specific hierachy adapter for Enum with anonymized sub-classes.
2011-01-19 23:28:28 +00:00
Jesse Wilson
fd0f526fb0
Basic functional test for type hierarchy adapter.
2011-01-19 23:25:27 +00:00
Jesse Wilson
a526da7cdd
Tests that demonstrate that type variables work.
...
Fixes issue 168.
2011-01-19 22:24:10 +00:00
Inderjeet Singh
edc71130c4
removed unneeded suppression of warnings.
2011-01-19 07:34:44 +00:00
Inderjeet Singh
b3685cff1e
added version numbers to various plugins.
...
replaced now deprecated ${version} with ${project.version}
2011-01-18 23:03:58 +00:00
Inderjeet Singh
9a792a9952
added tagbase to maven release plugin in POM
2011-01-18 22:52:45 +00:00
Inderjeet Singh
ce3520f5b5
disabling an assert that was causing failed test.
...
Per Jesse, this assertion is too difficult to support reliably.
2011-01-13 07:35:11 +00:00
Jesse Wilson
37dc0f8d3e
Type adapter for maps. Supports both complex and non-complex keys.
2011-01-12 00:17:21 +00:00