-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
writeRaw binary content #914
Comments
I do not recommend Also note that the answer may depend on specific format backend, at least when using last-effort methods like |
I mean specifically Currently, if I have an already encoded valid byte array (e.g. in Smile format), in order to append it, I need first to parse it (i.e. with |
Ok. That makes sense then. At this points, PRs would be welcome and/or specific per-format tickets to denote where exactly functionality is missing. As a work-around one can usually hold on to |
Thanks! I think it would be even better adding new methods to This would allow further enhancements at databind level by adding support for
What is your opinion about it? |
From API perspective it is sort of tricky, given that now we have set of methods that work/don't-work on different backends (text vs binary). I specifically would be against supporting binary-content - to -text-format (which some users would no doubt want :) ) because it could or could not work based on backend (not for But then again without this, I think my initial thinking is that I would want to defer variant(s) that take streams, and start with just We might also need to either use an existing It might make sense to divide into first supporting low-level ( I probably won't have tons of time to work on this myself but if you or anyone else has time, I would find time to code review and help with work. |
Sounds good to me, thanks for sharing! I will draft a PR as I find time. |
What is the recommended way to write raw binary content? As far as I can see
com.fasterxml.jackson.core.JsonGenerator#writeRaw()
variants only supportString
/char[]
/SerializableString
arguments, which are not suitable for binary formats.Is there any plan to extend it and accept binary arguments, i.e.
byte[]
/InputStream
?The text was updated successfully, but these errors were encountered: