Skip to content
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

Closed
wonderfly opened this issue Jan 9, 2015 · 8 comments
Closed

JsonObjectParser: builder to specify a data/error wrapper key #164

wonderfly opened this issue Jan 9, 2015 · 8 comments
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@wonderfly
Copy link
Contributor

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

@wonderfly wonderfly added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. imported labels Jan 9, 2015
@wonderfly wonderfly self-assigned this Jan 9, 2015
@wonderfly
Copy link
Contributor Author

From yan...@google.com on November 29, 2012 08:22:47

Labels: Milestone-Version1.16.0 Component-JSON

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 09, 2013 06:48:47

Labels: -Milestone-Version1.16.0 Milestone-Version2.0.0

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 24, 2013 05:49:31

Labels: -Milestone-Version2.0.0 Milestone-Version1.14.0

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 26, 2013 09:12:21

Issue 194 has been merged into this issue.

Cc: ngmic...@google.com

@wonderfly
Copy link
Contributor Author

From yan...@google.com on February 04, 2013 04:40:39

Owner: yan...@google.com

@wonderfly
Copy link
Contributor Author

From yan...@google.com on February 04, 2013 07:32:57

https://codereview.appspot.com/7286046/

Status: Started

@wonderfly
Copy link
Contributor Author

From yan...@google.com on February 05, 2013 11:41:57

Status: Fixed

@wonderfly
Copy link
Contributor Author

From yan...@google.com on February 09, 2013 05:17:22

Labels: -Priority-Medium Priority-High

clundin25 pushed a commit to clundin25/google-http-java-client that referenced this issue Aug 11, 2022
* Copy docs release version to latest folder

* Update link to documentation to latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant