Commit Graph

311 Commits

Author SHA1 Message Date
Joel Leitch
5bffa1f679 Fix for Issue 178. 2010-08-21 06:50:52 +00:00
Joel Leitch
3fc4bcc061 Minor test fixes. Explicitly fail test if the expected exception was not thrown. 2010-08-21 03:19:17 +00:00
Inderjeet Singh
de0f8da151 replaced unchecked suppressed warnings token with more specific rawtypes.
removed unused imports.
2010-08-20 16:27:46 +00:00
Inderjeet Singh
ed838ec104 replaced unchecked suppressed warnings token with more specific rawtypes 2010-08-20 16:20:37 +00:00
Jesse Wilson
bc5b836103 Test demonstrating a bug reported in issue 182, wherein malformed JSON is emitted when an property name contains a double-quote. 2010-08-20 05:45:51 +00:00
Jesse Wilson
8b5cc3256d Test demonstrating a bug reported in issue 178, wherein malformed JSON is emitted when a map key contains a double-quote. 2010-08-20 05:43:17 +00:00
Inderjeet Singh
cb6de44b56 Javadocs for Gson 1.5 2010-08-20 01:12:27 +00:00
Inderjeet Singh
24fd66f645 removed @since for non-public classes 2010-08-20 00:35:48 +00:00
Inderjeet Singh
dc60cb1931 Made FieldNamingStrategy2 is package protected class.
Made type hierarchy adapter registration package protected.
Marked some of the classes final.
Minor changes in the performance tests.
2010-08-19 00:10:42 +00:00
Joel Leitch
89c18452ae Ensure date with pattern is not override with the "default" date type adapter when a custom JsonSerializer/JsonDeserializer is registered. 2010-08-18 23:58:52 +00:00
Inderjeet Singh
01ce73441e Updated Gson version to 1.5 in maven configuration to match the current version. 2010-07-20 05:32:21 +00:00
Inderjeet Singh
08d3827dae Added methods with TypedKeys 2010-07-20 00:36:40 +00:00
Inderjeet Singh
8122deb364 fixed copyright notice, minor cosmetic changes. 2010-07-20 00:34:40 +00:00
Inderjeet Singh
425a59043d Added an example of a servlet class that uses Gson for web-service implementation. 2010-07-20 00:31:33 +00:00
Inderjeet Singh
c3f61ee5ad Added a test to reproduce bug described in http://groups.google.com/group/google-gson/browse_thread/thread/9591c539e3c19d59
Seems like an invalid bug report as Gson can deserialize primitive values in Integer fields.
2010-07-19 23:32:24 +00:00
Inderjeet Singh
341c4ce5d1 Added an example client to invoke example web-service
Update license files
2010-07-16 16:06:41 +00:00
Inderjeet Singh
8d24fe61f2 fixed the maven configuration file for relative paths 2010-07-13 21:59:35 +00:00
Inderjeet Singh
ceb2f8fdb0 A Web-service example 2010-07-13 21:47:37 +00:00
Inderjeet Singh
8bcbab629a Added an illustrative comment in the ParamMap precondition check. Added methods to take a formatted message in Preconditions. 2010-07-13 17:24:19 +00:00
Inderjeet Singh
58704f9aad removed the builder method that took String parameter name for better enforcement of type safety. 2010-07-13 17:16:47 +00:00
Inderjeet Singh
16c2832588 Made web-service client non-final to enable its mocks. 2010-07-12 23:10:58 +00:00
Inderjeet Singh
de74482fe8 Implemented hashCode and equals for TypedKey to make it a value object.
Asserted preconditions on constructor input.
2010-07-12 22:13:38 +00:00
Inderjeet Singh
b2af57d288 Added checks to ensure that typeHierarchyAdapter being registered doesn't hide a previously existing one.
Fixed a bug where registerIfAbsent was adding type adapters in the reverse order of priority.
Added toString() to Pair.
2010-06-24 21:51:18 +00:00
Inderjeet Singh
8aedbc84db Added a new GsonBuilder option to register a type adapter for a type hierarchy instead of a single type.
Upgraded Gson version to 1.5 since a new API call is being added.
2010-06-21 23:26:06 +00:00
Inderjeet Singh
6728c742d2 Updated log statements to be localizable. 2010-06-15 20:40:12 +00:00
Joel Leitch
9cd72ca7fb Add new tests with SerializedName annotation that contains a space in the name. 2010-05-28 02:13:11 +00:00
Joel Leitch
855a79a0f0 Stop generating the Parser class on mvn:compile or mvn:package. 2010-05-28 02:11:38 +00:00
Joel Leitch
ba0154867d Add support to allow spaces in the JSON field name. 2010-05-26 17:40:19 +00:00
Joel Leitch
389f918bb8 Add new performance test for large objects (many fields). 2010-05-19 21:29:58 +00:00
Joel Leitch
9c7bfc677a Allow cache size to be configured. 2010-05-19 20:47:27 +00:00
Joel Leitch
2610a2920d Update Parser to add members to an JsonObject within a loop rather than a recursive call. 2010-05-19 20:44:27 +00:00
Inderjeet Singh
e7e2e59f73 added missing put methods with TypedKey 2010-04-21 00:02:25 +00:00
Inderjeet Singh
00b5d77fa6 Revised methods using TypedKey to use the class contained in the TypedKey instead of explicitly asking for it as a method parameter. 2010-04-20 22:45:48 +00:00
Inderjeet Singh
d46fea80db added type cast to fix JDK version mismatch issue 2010-04-03 05:53:11 +00:00
Inderjeet Singh
7a115785b7 Added a getHeader method with a TypedKey in RestRequest. 2010-03-15 13:12:27 +00:00
Inderjeet Singh
d8638badf3 updated Google collections to the latest version 2010-02-16 14:02:42 +00:00
Inderjeet Singh
ad0e0d6f54 Added means to define and implement REST web-service and its clients.
Added missing copyright headers.
Added TypedKey based methods in request/response classes.
2010-02-15 23:24:48 +00:00
Inderjeet Singh
1925fb966c Introduced the notion of TypedKey for a parameter map or spec 2010-02-15 14:46:42 +00:00
Inderjeet Singh
9c8e8bd77e added ability to specify a Gson instance for use in getting a response. 2010-02-03 05:07:52 +00:00
Inderjeet Singh
f300cf35a2 removed Google collections and guice as dependencies 2010-02-02 14:02:35 +00:00
Inderjeet Singh
ef30498833 removed Google collections and guice as dependencies 2010-02-02 14:02:21 +00:00
Inderjeet Singh
a7e3971fdd Added setting of content-length in requests even if the body is non existent.
Fixed logs for requests.
Ensured that streams are not inadvertently closed while copying output.
2010-01-26 14:18:19 +00:00
Inderjeet Singh
dbca5571e0 Added Content-Length to each request that goes out.
If a web-service request fails, we try to log as much response as possible.
2010-01-24 15:02:17 +00:00
Inderjeet Singh
e4e9254034 Added an asynchronous client for invoking Web-services. This client uses a queue to hold web-service requests and returns the control back to the caller. A separate thread executes these web-service requests and invokes a caller-suplied callback with the results.
Made WebServiceClient reusable across different type of Web-service calls.
Added configurable logging support in RequestSender, ResponseReceiver and WebServiceClients. Added some logging.
Throwing WebServiceSystemException instead of RuntimException.
2010-01-20 13:59:59 +00:00
Inderjeet Singh
0a134db2f0 Added a new interface ResponseBuilder that is implemented by handlers to build a response of a specific type.
ResponseSender now sets the content-type of the stream to application/json
2010-01-20 13:53:53 +00:00
Inderjeet Singh
e5c89f1ebc Added a precondition check to ensure that a parameter being added to a ParamMap is compatible with its spec.
Added comments in RequestBody and ResponseBody to indicate that their Gson type adapters must be used.
2010-01-20 13:52:22 +00:00
Inderjeet Singh
51efca8457 Removed dependence on Guice and Collections from wsclient.
Renamed Builder.create() methods to Builder.build()
2010-01-19 12:58:52 +00:00
Inderjeet Singh
2bcc832ade removed dependence on Google Guice and Google Collections libraries 2010-01-19 12:47:11 +00:00
Joel Leitch
bf2a0e4e0b Adding tests to ensure the adapter from the old to new naming strategy is working properly. 2010-01-10 03:27:59 +00:00
Joel Leitch
9816426bba Add new Cache interface and LRU Cache implementation to cache field annotations per "Class" (rather than per instance). This results in a significant speed-up (approx. 3X) when serializing/deserializing the same classes over and over again. 2010-01-10 00:32:21 +00:00