jackson-dataformats-binary
jackson-dataformats-binary copied to clipboard
Add support for upcoming packed arrays tags
(originally by neothemachine)
There is a draft RFC to be published soon which adds support for packed/typed arrays in CBOR, see the current version. As one of the original CBOR authors is also an author of this proposal I'm sure it will gain widespread adoption in encoders and decoders, especially because it is such a useful feature and will help greatly when big packed arrays need to be efficiently encoded and also decoded both in terms of space usage and speed.
I thought it would be good putting it on the radar for implementation. I think it will be rather straightforward to implement. I currently don't have time for it myself in the next 3-4 weeks but I certainly will help where I can, reviewing code etc.
Quick note: Should be (more) doable with Jackson 2.8, planning to add JsonParser
support to make it possibly to efficiently and simply support a small set of "well-known" array types; int[]
and long[]
at least, but maybe short[]
for good measure.
Could be https://github.com/FasterXML/jackson-core/issues/241 or perhaps something even more direct.
So, explicit array writes are now included for int[]
, long[]
and double[]
: if packed arrays functionality becomes official CBOR feature it should be much easier to support those now.