Commit Graph

314 Commits

Author SHA1 Message Date
Inderjeet Singh
5d31558428 eliminated maven compilation problems with JDK 5 2011-05-25 16:13:36 +00:00
Inderjeet Singh
540d36e4bd API Change: Implemented various getAs methods to return null. 2011-05-25 07:08:21 +00:00
Inderjeet Singh
5e2bc1b8f0 New Public API: Exposed the singleton instance for JsonNull. 2011-05-25 07:01:36 +00:00
Joel Leitch
572421b771 Open object construction in JsonDeserializationContext to leverage the same object construction as default gson deserialization. 2011-05-20 21:50:39 +00:00
Inderjeet Singh
0bcd1b341f Revised Gson to refuse to deserialize floating point numbers into integer types.
This is probably a break from the past: previous versions of Gson allowed truncating a floating point into a long or int. However, it wasn't consistent in this behavior. It disallowed converting a BigDecimal value into BigInteger, int or long. Refusing to deserialize such values is aligned with fail-fast approach of uncovering bugs.
2011-05-04 23:26:22 +00:00
Jesse Wilson
ce79e16f7a StringPooling. This makes things up to 20% faster on dalvikvm for some data sets. 2011-04-28 22:08:06 +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
f291c4d33e Fix a bunch of preserve-type issues:
- Issue 205
- Issue 294
- Issue 318
2011-04-20 22:27:51 +00:00
Joel Leitch
e345feb438 Comments from r821 2011-04-14 18:54:09 +00:00
Joel Leitch
c894fb6c23 Default support for BitSet. As well, provide more flexibility on getAsBoolean for a JsonPrimitive. 2011-04-14 02:42:47 +00:00
Inderjeet Singh
5552d17d05 removed assembly-descriptor.xml from Gson jar 2011-04-13 18:26:51 +00:00
Inderjeet Singh
9bfe443950 marked package private classes final 2011-04-13 15:57:11 +00:00
Joel Leitch
1c3d08794d Fixed typo. 2011-04-13 07:49:30 +00:00
Joel Leitch
5770be4ed2 More fixes to JavaDoc. 2011-04-12 22:03:15 +00:00
Joel Leitch
4917fc7f76 Lift restriction on naming when using the "@SerializedNamed" annotation.
Fix for Issue 290.
2011-04-12 17:29:19 +00:00
Joel Leitch
ecf137fec3 More fixes to JavaDoc. 2011-04-11 19:01:07 +00:00
Joel Leitch
c5c7c5bb64 More fixes to JavaDoc. 2011-04-11 18:52:29 +00:00
Joel Leitch
49e7ee05fc Fix method name by making it singular. 2011-04-11 18:44:19 +00:00
Joel Leitch
c266097310 Fix minor JavaDoc issue. 2011-04-11 18:33:46 +00:00
Joel Leitch
457b37f08e Replace var-args with single parameter. 2011-04-11 18:09:59 +00:00
Joel Leitch
854b92a78f Comments from r789 2011-04-07 18:00:12 +00:00
Inderjeet Singh
4bd261ae06 Made FieldNamingStrategy2 and its corresponding builder method package-private. 2011-04-07 17:41:35 +00:00
Inderjeet Singh
c15f570c72 Added a warning in the documentation of the internal package. 2011-04-06 01:08:12 +00:00
Inderjeet Singh
05ae10a144 removed the constructor in FieldAttributes that was only used in tests. 2011-04-06 00:51:01 +00:00
Joel Leitch
ddb0c8c825 Minor formatting fixes. 2011-04-06 00:43:57 +00:00
Inderjeet Singh
7afda06253 Added warning in GsonBuilder regarding setting date format correctly. 2011-04-06 00:35:05 +00:00
Inderjeet Singh
c8bd121db2 Renamed $Preconditions to $Gson$Preconditions and $Types to $Gson$Types.
Marked the two private classes in $Types as final.
2011-04-06 00:26:57 +00:00
Inderjeet Singh
8d3bfc0f47 Marked the getTypeInfoForField() method package private as it was inadvertently marked public.
Removed commented out code in pom.xml that is now obsoleted with sonatype syncing.
2011-04-06 00:13:31 +00:00
Joel Leitch
b4eb810347 Comments for r766. 2011-04-06 00:02:40 +00:00
Joel Leitch
52bf144859 Comments for r767 2011-04-05 23:57:13 +00:00
Joel Leitch
dc283e1121 Fixed comments from r774. 2011-04-05 23:36:05 +00:00
Joel Leitch
944081327b More very minor cleanup. 2011-04-04 23:18:25 +00:00
Joel Leitch
f36c1bc222 Very minor cleanup. 2011-04-04 23:17:43 +00:00
Joel Leitch
7c42ef3e5d Update incomplete comment. 2011-04-04 23:16:44 +00:00
Joel Leitch
2fb8c92812 Use more specific type for map serialization if possible. 2011-04-04 23:13:31 +00:00
Inderjeet Singh
50b4e3f4b9 Using getElement() instead of get() to get proper synchronization. 2011-04-04 23:00:19 +00:00
Inderjeet Singh
542a17c3bc Incorporated comments from r710 2011-04-04 22:48:34 +00:00
Inderjeet Singh
56b7ab1b71 Incorporated feedback from r718 2011-04-04 22:23:51 +00:00
Inderjeet Singh
feb9617bf0 Incorporated comments from r726 2011-04-04 22:09:51 +00:00
Inderjeet Singh
bf4ab04413 replaced multiple caches in ReflectingFieldNavigator with a single one.
Two additional optimizations:
- storing the field list for the entire type hierarchy in the cache instead of navigating it every time.
- storing the resolved type for the field in FieldAttributes instead of using reflection every time.
2011-04-01 23:54:41 +00:00
Inderjeet Singh
9c894c7485 switched from accessing field to an accessor method for access in tests.
Strangely, this fixes the broken tests in the continuous build.
2011-03-31 18:57:55 +00:00
Inderjeet Singh
5bc80cd693 Moved Cache, LruCache, Pair, Primitives and UnsafeAllocator to com.google.gson and made them package private. 2011-03-30 13:59:06 +00:00
Inderjeet Singh
523f489863 Got rid of an unneeded method. 2011-03-29 21:38:08 +00:00
Jesse Wilson
f718784f33 Use the date format for java.sql.Date and java.sql.Timestamp.
Fixes issue 230.
2011-03-29 21:36:19 +00:00
Jesse Wilson
4efb133b4a bling bling
Prefix internal classes with $ to prevent them from interfering with IDE's auto import functionality.
2011-03-29 21:24:26 +00:00
Joel Leitch
5e74dabad9 Re-use Preconditions instead of re-writing them here. 2011-03-29 21:18:27 +00:00
Jesse Wilson
9bcb0c0b6b Use the internal copy of preconditions 2011-03-29 21:13:31 +00:00
Joel Leitch
454f58a7b1 Adding in instance creator to instantiate the concrete Collection or Map class if known, otherwise fallback to a default instance.
Also, added some caching as part of the default constructor lookups.
2011-03-29 16:57:28 +00:00
Inderjeet Singh
ad921a0ee8 removed unused variable. eliminated unnecessary ObjTypePair creation. 2011-03-24 22:37:03 +00:00
Inderjeet Singh
4d9bec2206 Caching inheritance hierarchy for a type to reduce performance impact of reflection. 2011-03-24 22:28:45 +00:00