Menu

#7 Bean conversion: support XSD binary encoding types for byte[]

open
nobody
None
5
2013-10-08
2013-10-08
No

Current transformation of a byte[] is as a series of separate elements, each containing one byte. This is extremely inefficient.

XSD specifies two encodings for arbitrary binary data, and both should be supported via options. See http://www.w3.org/TR/xmlschema-2/#base64Binary and http://www.w3.org/TR/xmlschema-2/#hexBinary for details.

Open issue: should one of these be the default encoding for byte[]? My thought is yes: I think it's unlikely that existing code would be broken by making the current nested-element format be an option.

I lean toward the hex-encoded version being default, as it provides the most benefit as a text format (ie, there are likely to be applications that can use the encoded value directly, without the need to translate back to byte[]; base-64 requires decoding to be useful).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.