jackson-dataformat-cbor icon indicating copy to clipboard operation
jackson-dataformat-cbor copied to clipboard

Develop

Open vinlecomte opened this issue 8 years ago • 0 comments

https://groups.google.com/forum/#!topic/jackson-dev/QDkhQBD3PaA

Hi Tatu

According to our discussion, this is our changes to the CBOR dataformat that allows the usage of bounded arrays and objects. No changes to the API has been done. The implementation in CBORGenerator has slightly changed for: • writeStartArray() • writeStartArray(int size) • writeEndArray() • writeStartObject() • writeStartObject(Object forValue) • writeEndtObject ()

We added: • writeStartObject (int size) (new method) • Stack<Integer> _arraySize • Stack<Integer> _objectSize

The class CBORGeneratorSizer decorates CBORGenerator permits the queuing of writing commands defined in CBORCommands. We stack the commands until the end of objects or arrays.

We created another Factory to avoid impacting CBORFactory. Also we want both functionality available since our approach can have some drawbacks on memory usage.

Thanks,

vinlecomte avatar Apr 04 '16 15:04 vinlecomte