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 support for writing byte[] via JsonGenerator.writeEmbeddedObject() #318

Closed
cowtowncoder opened this issue Sep 1, 2016 · 0 comments
Closed

Comments

@cowtowncoder
Copy link
Member

(note: should be safe for patch, that is, 2.8.3)

Default implementation of 2.8-added writeEmbeddedObject() throws exception (unsupported operation) for all values, since JSON does not have any native object types.
This is different from handling of writeObject(), which tries to either delegate to ObjectCodec (if one registered), or even encode "simple" values.

However: since support for binary data is already handled in some cases using VALUE_EMBEDDED_OBJECT, it would actually make sense to handle case of byte[] (and, if feasible, perhaps ByteBuffer for extra points), and also ensure null can be written.

This is likely necessary to support FasterXML/jackson-databind#1361 and should in general make system more robust.

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