Commit Graph

13 Commits

Author SHA1 Message Date
Jesse Wilson
de727d8c48 Delete dead code found by coverage 2011-10-01 02:04:48 +00:00
Inderjeet Singh
824635158c Parsing numbers lazily as a performance enhancement.
This avoids needing to parse number if the equivalent object field doesn't exist.
It also avoids the performance penalty of trying to parse it eagerly as a big decimal, float etc.
2011-04-28 21:57:29 +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
Joel Leitch
18b301dfeb - Serializing of Object arrays.
- Fixed incorrect warning
2009-09-22 19:04:27 +00:00
Inderjeet Singh
82771f006c removed Java 1.5 warnings 2009-08-31 17:51:47 +00:00
Joel Leitch
c9cb05fc72 Do not leak out a ClassCastException to our clients. 2009-03-27 19:43:33 +00:00
Inderjeet Singh
3d1f7251c1 Added tests to reproduce issue 103. The tests pass at the moment, so we need more information in the bugreport. 2009-03-12 01:04:30 +00:00
Joel Leitch
458f2baa2f Added special serialization of "Long". Now the client has the ability to output a long field as a JSON "String". This is useful for JavaScript clients that need to handle long values.
As well, this change does a major clean up of the custom type adapter handling and ParameterizedTypeMap creation.
2008-12-28 03:23:36 +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
9245bebdba For the Collection and Map types, using ObjectConstructor to create instance instead of hard-coding a specific type.
This helps is handling cases where the user is using their own subclass of Collection or Map.

Updated ParameterizedTypeHandlerMap to return the handler corresponding to Map and Collection for subclasses if user has not specified a specific handler.

Fixed the logic in JsonTreeNavigator to not output a comma if the first field of an object was null.
2008-11-14 02:11:46 +00:00
Inderjeet Singh
57d1f32de5 moved gson as a project under trunk 2008-09-01 03:13:32 +00:00