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

Support nested elements in @Key annotation #89

Closed
wonderfly opened this issue Jan 10, 2015 · 3 comments
Closed

Support nested elements in @Key annotation #89

wonderfly opened this issue Jan 10, 2015 · 3 comments
Assignees
Labels
imported priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@wonderfly
Copy link
Contributor

From jcwen...@gmail.com on December 06, 2010 06:28:41

The @key("param") annotation does not support nested tags per Partial Response idioms. For example: @key("gf:symbol/@symbol") should return the symbol attribute from the symbol element within the element being parsed, without requiring the user to create a new class as an intermediary. 1.2.1-alpha fails to parse and returns null. Support for nested elements would be of great help in parsing as some of the Google APIs nest rather deeply and it would be useful to be able to flatten the structure somewhat. Another example is @key("gf:positionData/gf:marketValue/gf:money/@amount" -- Does that really need three nested classes to parse?

Original issue: http://code.google.com/p/google-api-java-client/issues/detail?id=72

@wonderfly wonderfly added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. imported priority: p2 Moderately-important priority. Fix may not be included in next release. Component-Util labels Jan 10, 2015
@wonderfly wonderfly self-assigned this Jan 10, 2015
@wonderfly
Copy link
Contributor Author

From yan...@google.com on December 06, 2010 12:16:18

I've gotten multiple features requests like this from other sources as well. Thanks for filing a formal feature request. Good explanation of the benefits of such a feature. It would make the XML data structure much easier to work with, e.g. not having to check for nulls for the intermediary classes.

Unfortunately, it would be a rather complicated feature to implement. So although I agree it would make it easier to use, it has not yet been determined if the extra complexity in the implementation is worth the user benefit.

Status: Accepted

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 08, 2011 10:30:06

Labels: Component-Util

@wonderfly
Copy link
Contributor Author

From yan...@google.com on June 04, 2011 09:09:24

Ported to: https://code.google.com/p/google-http-java-client/issues/detail?id=11

Status: Moved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported priority: p2 Moderately-important priority. Fix may not be included in next release. 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