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

Add JsonGenerator.writeFieldId(long) method to support binary formats with non-String keys #294

Closed
cowtowncoder opened this issue Jun 28, 2016 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

Some/many binary formats allow use of keys other than Strings; CBOR for one. Since coercion from non-Strings is already needed even with JSON (to support Java Maps with typed keys), it would be easy to add a method like:

public writeFieldId(long id);

with default implementation that just converts id into String and calls writeFieldName(), and where dataformat implementations may override it. In future (2.9?) jackson-databind could then start calling this method for limited case; and users that directly use streaming API may just call this method as necessary.

@cowtowncoder cowtowncoder added this to the 2.2.1 milestone Jun 29, 2016
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