On Fri, Jan 3, 2020 at 9:09 AM TheCrisbros15 <crisbro...@gmail.com> wrote:

> Thanks, and I wanted to know how one would specify using the cbor
> generator a map with a specific size? Or does the generator handle it in
> the background?
>

CBOR has both fixed-set and indefinite variants of Object; Jackson by
default uses indefinite length (indicates end by marker byte). So you do
not have to do anything.

As to length-prefixed encoding: this is not yet supported, although there
is an issue:

https://github.com/FasterXML/jackson-dataformats-binary/issues/3

requesting it to be supported. If anyone has the itch, contributions are
welcome: streaming level API exists for passing this information but
generator needs to add verification that size will be obeyed, to avoid
encoding invalid content. Such checking is implemented for Array output
already, fwtw, so that could serve as inspiration.

-+ Tatu +-

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/CAGrxA26-G4Qx7LHGdt0J6fzmqPSpYUnn4S3dywUHqv_up0Kb7g%40mail.gmail.com.

Reply via email to