cddl-codegen icon indicating copy to clipboard operation
cddl-codegen copied to clipboard

Explicit implemenetation serde::Serialize & Deserialize for types used as keys

Open SebastienGllmt opened this issue 3 years ago • 1 comments

I'm not sure if there is a good way to codegen this, but the current codegen logic will not explicitly generate serde::Serialize & serde::de::Deserialize traits for types even if they are used as keys in maps which causes a crash on to_json calls

For example, see https://github.com/dcSpark/cardano-multiplatform-lib/issues/115

SebastienGllmt avatar Aug 23 '22 17:08 SebastienGllmt

I think this is somewhat related to #96 since this crash is caused by types that have an unclear serialization format such as addresses needing to be converted to string, etc.

SebastienGllmt avatar Sep 12 '22 16:09 SebastienGllmt