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 methods to detect whether underlying format can support read/write binary natively #103

Closed
cowtowncoder opened this issue Sep 14, 2013 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

Some formats can write binary data "natively", without using encodings like Base64: for example Smile and Avro formats. Others require encoding.
But while parser and generator implementations have knowledge of this, databind does not know whether this is true.

When writing explicitly binary data, knowledge is not all that important: generator and parser can handle it transparently.
But there are types like java.util.UUID, where ability for use of direct binary representation would be useful (16 bytes raw, vs 36 character textual) -- yet use of base64-encoding may or may not make sense: 24 bytes base64-encoding is more compact, but less readable.

So: let's add capability detection methods to let databinding choose binary in cases where native support exists.

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