(note: continuation from #93)
Although coercing "undefined" into null token works to some degree, it seems better to allow exposing it in a way that allows caller to distinguish between real null and "undefined".
Since we have to do this via Jackson API, tokens, the most straight-forward reliable mean is to either:
- Return
JsonToken.VALUE_EMBEDDED_OBJECT, with "value" of null
- Add a new method in
CBORParser to let caller determine if last token returned was for "undefined" (CBOR encoded value of 0xF7)
Or, better yet, allow both.
For backwards compatibility (since 2.9.6, "undefined" has been returned as JsonToken.VALUE_NULL), we need a new CBORParser.Feature to enable (1).
New method (name To Be Determined), however, will be available in either case, regardless of token chosen to represent it.
(note: continuation from #93)
Although coercing "undefined" into
nulltoken works to some degree, it seems better to allow exposing it in a way that allows caller to distinguish between realnulland "undefined".Since we have to do this via Jackson API, tokens, the most straight-forward reliable mean is to either:
JsonToken.VALUE_EMBEDDED_OBJECT, with "value" ofnullCBORParserto let caller determine if last token returned was for "undefined" (CBOR encoded value of0xF7)Or, better yet, allow both.
For backwards compatibility (since 2.9.6, "undefined" has been returned as
JsonToken.VALUE_NULL), we need a newCBORParser.Featureto enable (1).New method (name To Be Determined), however, will be available in either case, regardless of token chosen to represent it.