New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JsonObjectParser: builder to specify a data/error wrapper key #164
Comments
From yan...@google.com on November 29, 2012 08:22:47 Labels: Milestone-Version1.16.0 Component-JSON |
From yan...@google.com on January 09, 2013 06:48:47 Labels: -Milestone-Version1.16.0 Milestone-Version2.0.0 |
From yan...@google.com on January 24, 2013 05:49:31 Labels: -Milestone-Version2.0.0 Milestone-Version1.14.0 |
From yan...@google.com on January 26, 2013 09:12:21 Issue 194 has been merged into this issue. |
From yan...@google.com on February 04, 2013 04:40:39 Owner: yan...@google.com |
From yan...@google.com on February 04, 2013 07:32:57 https://codereview.appspot.com/7286046/ Status: Started |
From yan...@google.com on February 05, 2013 11:41:57 Status: Fixed |
From yan...@google.com on February 09, 2013 05:17:22 Labels: -Priority-Medium Priority-High |
* Copy docs release version to latest folder * Update link to documentation to latest
From yan...@google.com on November 12, 2012 06:51:00
External references, such as a standards document, or specification? http://javadoc.google-http-java-client.googlecode.com/hg/1.12.0-beta/com/google/api/client/json/JsonObjectParser.html http://javadoc.google-api-java-client.googlecode.com/hg/1.12.0-beta/com/google/api/client/googleapis/json/JsonCParser.html https://groups.google.com/forum/?fromgroups=#!topic/google-http-java-client/7mPGURWxw2o Java environments (e.g. Java 6, Android 2.3, App Engine, or All)? All Please describe the feature requested. Some APIs wrap the JSON data in the response. For example, Google Latitude wraps its data in a "data" key. According to a developer on the Google group, .NET webservices wrap the data in a 'd' key. To make life easier for Google APIs, we implemented JsonCParser which enables the developer to not have to declare to wrapper classes.
We should generalize it so it can be used across all cases, allowing the data/error wrapper key to be specified when constructing the JsonObjectParser. We should use the builder pattern to ensure thread safety. By default it would assume that there is no data/error wrapper key, but if you use the builder you can override that, e.g.: new JsonObjectParser.Builder(JsonFactory).setDataKey("data").setErrorKey("error").build()
Original issue: http://code.google.com/p/google-http-java-client/issues/detail?id=164
The text was updated successfully, but these errors were encountered: