enarx / ciborium

CBOR utilities
Other
222 stars 54 forks source link

[Feature]: Custom type example #98

Open tulku opened 6 months ago

tulku commented 6 months ago

Is there an existing issue for this?

Description

I am trying to do something similar to what is explained in this Python CBOR library: https://cbor2.readthedocs.io/en/latest/customizing.html#using-the-cbor-tags-for-custom-types

I want to be able to encode and decode a custom struct using a custom tag.

I understand that this is possible, by looking at Value, however, it would be very useful to have a simple example explaining how to do it.

Acceptance Criteria

No response

Suggestions for a technical implementation

No response