Skip to content

CBOR serialization and removing RFC7049#2.4 type hints #516

Answered by cowtowncoder
lachlan-ibm asked this question in Q&A
Discussion options

You must be logged in to vote

Ok so, no, you cannot force this easily from databind level (where JsonSerializers are defined) which is format-agnostic. None of serializers know of actual underlying format, or encoding details.

So ability to suppress type tags/hints would need to be done at streaming API level, probably by adding

CBORGenerator.Feature.FEATURE_NAME

(where FEATURE_NAME would be like USE_TYPE_TAGS or USE_TYPE_TAG_xxx)

and then making CBORGenerator take that into account when encoding.

Above is my initial thinking without considering any of the details (and only vaguely remembering how type tags / hints were used).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@lachlan-ibm
Comment options

Answer selected by lachlan-ibm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants