-
Notifications
You must be signed in to change notification settings - Fork 99
Parsing and Emitting Tags #3
Comments
It is currently not possible because serde does not support serializing and deserializing tags. If you need it I will propose a PR to serde to add this function. |
Thank you. But for my "hello world" class project easier to use go or even c11. |
@pyfisch I'm looking into using this for an implementation, but I will need to be able to use custom tags. How far of is that? Or should I just use http://burntsushi.net/rustdoc/cbor/ for now, which already implements handling of custom tags, though as I'm using serde_json already in other parts I'd really like to use serde_cbor. |
Adding support for tags to serde_cbor requires support from the serde crate. There is already an issue about adding adding tags to serde: serde-rs/serde/issues/163 but it has not yet been decided how the support should look like. Tags are specific to serializiation formats and for this reason it is hard to handle them in a generic serializiation framework. @erickt Do you have any ideas about this? @dignifiedquire Yes probably you should use burntsushis cbor implementation for now. |
Any news on this? |
Nope, if this should be done well it needs some help from serde. Currently there is a lot of work going on related to no-std compatibility and I plan to generally polish the crate. When this is finished tags can be discussed again. |
This may need to wait for specialization, where this crate could define subtraits of Serializer/Deserializer/etc that provide extra methods to interact with tags. Serialize/Deserialize implementations could then specialize for that subtrait to interact with the extra functionality. |
I'm also interested in tagging. I would like to implement a COSE library [https://tools.ietf.org/html/rfc8152], but that requires tags. https://github.com/BurntSushi/rust-cbor suggests using this crate, since that one is unmaintained, but this one doesn't have tags. SerDe seems stuck on tagging due to missing specialization support: serde-rs/serde#455. Do you think adding some extra tagging API to this crate in the interim could make this work? |
Hello. I'm what to emit Tag(0) (RFC 3339 date-time string), but i can't find any hints.
The text was updated successfully, but these errors were encountered: