FasterXML / FasterXML/jackson-dataformats-binary

Introduce the writePOJO (or writeObject) with the element size

Open
#329 2 comments 0 reactions 0 assignees View on GitHub
cbor
Dominant language
Java
Stars
347
Forks
156
Avg merge
3d 3h
Merged PRs (30d)
22

Description

CBOR has some variants to optimize the encoded output size to indicate the length of the elements.
Jackson CBOR generator has been supporting such feature by introducing some public methods.
But, there is no such variant method for **writeObject** or **writePOJO**.
In order to properly generate the optimized output (some implementation forces to optimize the output due to interoperability), it would be better to have such features in the CBOR generator.

So, new API signature seems to be

`public void writePOJO(Object pojo, int elementsToWrite) throws IOException`
or
`public void writePOJO(Object pojo, boolean makeDefiniteLength) throws IOException`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.