Skip to content

How does decoding unordered maps work?  #411

@mkschreder

Description

@mkschreder

It seems that current code generator is still outputting code that expects map keys in the exact order that they are defined in cddl.

Type = {
   key_a: int,
   key_b: int
}

The code generated from this will be a long if statement where the fields are in exact order with && between. So decoding in any order does not work.

Is there a workaround for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions