Commit Graph

342 Commits

Author SHA1 Message Date
Inderjeet Singh
25f0014305 Added SNAPSHOT tag.
Added Google as organization and Jesse Wilson as developer.
2011-01-10 22:36:24 +00:00
Inderjeet Singh
8380d28e6f removed compiler warnings 2010-12-06 19:47:41 +00:00
Jesse Wilson
883ce465d5 Second half of adopting Guice's types code.
This removes a bunch of unnecessary public APIs and looks more like the GSON code that existed before this whole exercise. We no longer use TypeToken.isAssignable. I wrote a test that demonstrates at least one problem with that method, so I've deprecated it. We should be able to remove it release-after-next; nobody should be using this method anyway.

There are still some things that are public that shouldn't be. In particular there's some APIs in Types that are needed by TypeToken, which is unfortunately in a different package. Traditionally the fix is to create an 'internal' package and make the shared code public in the internal package. I'm not sure what we want to do for GSON; we could also use reflection (yuck) or duplicate the code (yuck).
2010-12-03 18:12:26 +00:00
Jesse Wilson
d1ddab2e6f Swap out GSON's type mechanics with the Type resolution code from Guice.
The most significant impact of this change is that fields whose types are type parameters should now GSONify just fine. For example, consider the class below.

abstract class Foo<A, B> {
   A a;
   B b;
   List<A> list;
   Map<A, List<B>> map;
}
class RealFoo extends Foo<String, Integer> {...}

This is a reasonable checkpoint but some work still needs to be done for this. In particular, the level of visibility of methods in TypeToken and Type should be reconsidered; we're exposing more than we need to!
2010-12-03 08:07:13 +00:00
Inderjeet Singh
faa5464e84 updated current version to 1.7. Added stream package to OSGI. Added maven-changes-plugin. 2010-11-25 20:00:38 +00:00
Inderjeet Singh
5be830835d Added report for subversion changelogs 2010-11-25 15:15:41 +00:00
Inderjeet Singh
9f5aa1772b added reports on TODO tags 2010-11-25 15:07:44 +00:00
Inderjeet Singh
6818edecf9 enabled GsonBuilder.registerTypeHierarchyAdapter since head is now for Gson 1.7 2010-11-25 00:16:06 +00:00
Inderjeet Singh
e061d0e563 Added findbugs reporting in maven pom.xml 2010-11-25 00:14:49 +00:00
Jesse Wilson
90e7de92df New Javadocs for 1.6 2010-11-24 23:41:30 +00:00
Jesse Wilson
1672d2cfe0 Removing GSON 1.5 javadocs 2010-11-24 23:40:29 +00:00
Jesse Wilson
1c5f5132d8 Revert most of r677: Required strings to be quoted even in lenient mode. As far as Inderjeet and I can tell, this is consistent with Gson 1.5. 2010-11-24 23:22:13 +00:00
Inderjeet Singh
d87eed510b Fixed compilation problem since we dropped registerTypeHierarchyAdapter method 2010-11-24 23:14:30 +00:00
Inderjeet Singh
db3f19e881 dropping GsonBuilder.registerTypeHierarchyAdapter() from 1.6 release. 2010-11-24 23:13:29 +00:00
Inderjeet Singh
98ff894863 removed unnecessary else clause. 2010-11-22 23:14:51 +00:00
Joel Leitch
56344cf067 Remove duplicate test. 2010-11-16 22:18:28 +00:00
Joel Leitch
0a3f5fa801 Required strings to be quoted even in lenient mode.
As far as Inderjeet and I can tell, this is consistent with Gson 1.5.
2010-11-16 22:14:40 +00:00
Inderjeet Singh
279649986e Added a test to ensure that Gson handles repeated invocation of itself correctly.
Revised proto maven configuration to use Gson 1.6
2010-11-15 22:56:01 +00:00
Inderjeet Singh
520259fefa removed eclipse warnings. 2010-11-12 19:21:16 +00:00
Joel Leitch
7d055fcb51 Fixing fromJson type casting. 2010-11-11 18:22:45 +00:00
Inderjeet Singh
eac1505670 Removed eclipse warnings about unneeded else statements and rawtypes/unchecked access. 2010-11-11 07:29:55 +00:00
Joel Leitch
32afd1a4e4 Fixing parsing of unquoted strings to be (somewhat) consistent with previous versions of Gson. The difference with this version is that Gson will throw a more specific exception rather than JsonParseException. 2010-11-10 02:02:57 +00:00
Jesse Wilson
103edb9c36 Don't return null on an unexpected EOF unless the document is empty. This brings us back to compatibility with GSON 1.5. 2010-11-08 19:16:05 +00:00
Jesse Wilson
4d0cd67cde Addressing code review feedback from r585 and r648. 2010-11-08 01:22:21 +00:00
Joel Leitch
6a951b427e Adding new tests (two of which are disabled, but prepping for 1.7). 2010-11-05 22:57:44 +00:00
Joel Leitch
f6a332971f Warning fixes. 2010-11-05 22:47:13 +00:00
Inderjeet Singh
f4098b5cf7 implemented feedback from r585 2010-11-05 22:18:35 +00:00
Inderjeet Singh
c3bae2d35e incorporating code review comments from r648 2010-11-05 21:51:29 +00:00
Jesse Wilson
832257234d New overloads for constructing MalformedJsonException 2010-11-05 20:58:41 +00:00
Joel Leitch
bdf5bef887 Fix JavaDoc on JsonSyntaxException 2010-11-05 20:34:27 +00:00
Inderjeet Singh
0b4bf7706a Changed JsonParser API to throw specific JsonIOException,JsonSyntaxException instead of the general JsonParseException 2010-11-05 20:31:52 +00:00
Inderjeet Singh
7b99419aea Removed compiler warnings. 2010-11-03 23:14:42 +00:00
Inderjeet Singh
10db917e93 Updated fromJson and toJson signatures to indicate the kind of exceptions (JsonIOException, JsonSyntaxException) that can be thrown. 2010-11-03 19:46:29 +00:00
Inderjeet Singh
83539c534c removed compiler warnings.
Added default serial version id for MalformedJsonException.
2010-11-03 13:28:09 +00:00
Inderjeet Singh
82a1a9511e removed a System.out.println from a test. 2010-11-03 01:25:57 +00:00
Inderjeet Singh
200bccef21 Added tests for issue 249 2010-11-03 00:15:03 +00:00
Joel Leitch
c6a4f55d1a Fix for Issue #40. 2010-11-02 03:32:39 +00:00
Inderjeet Singh
a224bb1e2b added serial version id 2010-11-01 23:16:03 +00:00
Inderjeet Singh
ad7bd1f465 removed unused JsonFormatter classes. 2010-11-01 23:10:09 +00:00
Jesse Wilson
dea7ab89fe Restore pretty printing. The pretty printing format isn't as compact as the previous format - for example arrays of integers are printed one-per-line, whereas the previous format compacted these to all sit on the same line. 2010-11-01 23:03:41 +00:00
Inderjeet Singh
43f2a0012b Removed JavaCC parser definition and its generated classes. 2010-11-01 22:57:39 +00:00
Inderjeet Singh
abe244c099 renamed com.google.gson.stream.JsonSyntaxException to MalformedJsonException.
Throwing JsonSyntaxException instead of JsonParseException where we can detect a syntax error.
2010-11-01 22:48:52 +00:00
Jesse Wilson
c8c3a6965c Fix a regression that expects different type adapters for long.class and Long.class. This is a temporary fix; later we may want to always use the canonical wrapped class. 2010-11-01 22:46:20 +00:00
Jesse Wilson
20d895ff95 Fix primitive wrapping and casting.
Issue: 235
2010-11-01 22:36:30 +00:00
Joel Leitch
d0977c2e3a Exposing the declaring class for the field wrapped by FieldAttributes. 2010-11-01 22:31:48 +00:00
Inderjeet Singh
7127be7965 Updated the OSGi descriptor to 1.6 2010-11-01 22:12:58 +00:00
Inderjeet Singh
7ea5cc2b36 Added a new JsonSyntaxException to indicate syntax errors in Gson. 2010-11-01 17:53:31 +00:00
Jesse Wilson
d9feb90593 Small cleanup of exception conversion. 2010-10-31 04:58:23 +00:00
Jesse Wilson
b2005299e4 Make JsonSyntaxException public, so clients can differentiate between IO problems and malformed JSON. 2010-10-30 21:32:08 +00:00
Inderjeet Singh
2b993d83b6 Made the GsonBuilder registerTypeHierarchyAdapter a public method.
Updated the Gson version number to 1.6 and added @since tag for the new classes
2010-10-27 23:53:09 +00:00