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

Add comment notation to disable generation to to to/from json for type

Open SebastienGllmt opened this issue 3 years ago • 1 comments

Some types such as addresses require a custom to/from json that converts them to base58 or bech32. It would be nice if there was a way to get the codegen to avoid adding the automatic to/from json if specified

SebastienGllmt avatar Sep 07 '22 13:09 SebastienGllmt

This is partially addressed by _CDDL_CODEGEN_EXTERN_TYPE_ introduced in https://github.com/dcSpark/cddl-codegen/pull/130 which is useful for types that are represented entirely outside the codegen.

However, this ticket is for a slightly less extreme case where we still want to generate code, but just want to override the string representation of the type

SebastienGllmt avatar Feb 07 '23 06:02 SebastienGllmt