Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for reading Date type (defined using type tags) #230

Open
sbernard31 opened this issue Nov 26, 2020 · 4 comments
Open

Add support for reading Date type (defined using type tags) #230

sbernard31 opened this issue Nov 26, 2020 · 4 comments
Labels

Comments

@sbernard31
Copy link

Maybe I'm wrong but It seems to me currently there is no support for Date type for CBOR.

Is it something planned to support date like defined in RFC7049§2.4.1 ?

@cowtowncoder
Copy link
Member

I think you are right; tagged types have been added over time, and were not there when the module was implemented.

Although implementing support is theoretically bit tricky since Jackson's streaming API does not have similar concept (it is very much CBOR specific approach, although Avro has somewhat similar concept of logical type; and the idea itself is pretty useful). But the one fallback mechanism -- exposing "native" types as JsonToken.VALUE_EMBEDDED_OBJECT, and making sure databind-level JsonDeserializers can take these into account -- exists and should work.

I'll label this as 2.13 since there is no time to implement this for 2.12.0; but given that it does not change API it could perhaps be introduce in a 2.12.x patch as well, if someone has time to implement it.

I'd be happy to help implement this if anyone has time to play around with the approach?

@sbernard31
Copy link
Author

sbernard31 commented Nov 27, 2020

We currently hesitate between 2 CBOR library. If Jackson is chosen, I could maybe find time to work on this (with help because I didn't know so well Jackson). So nothing sure for now 😕.

@cowtowncoder
Copy link
Member

@sbernard31 Ok thank you for sharing this. I would be interested in helping with logical data types, as well as integration issues. If you (or anyone else) has time, we could perhaps collaborate; and some of support could well be included in 2.12.x patches.

@cowtowncoder cowtowncoder changed the title Cbor add support of Date type. Add support for reading Date type (defined using type tags) Nov 28, 2020
@cowtowncoder
Copy link
Member

(updated title a bit -- there may be need to support writing of values, too, but that will need different technical solution; two sides are not tightly coupled in this area)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants