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

JsonParser.getValueAsString() should return field name for JsonToken.FIELD_NAME, not null #188

Closed
cowtowncoder opened this issue Mar 31, 2015 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

(note: offshoot of FasterXML/jackson-databind#745)

Although Javadocs do not specify expected behavior for JsonParser.getValueAsString(), when current token is JsonToken.FIELD_NAME, it makes more sense to return name as-is, instead of null.
This will simplify handling of code that requires a String representation; and code that does need to know the difference can use token type if that is relevant.

While this can be seen as a fix it is still a minor API change, so it needs to go in 2.6.0, not a 2.5.x patch release.

@cowtowncoder cowtowncoder added this to the 2.6.0 milestone Mar 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant