Skip to content

CBOR validation for type choice in array #116

@tomachristian

Description

@tomachristian

Using the latest version at this point in time: 0.9.0-beta.1.

I am having a problem with validating CBOR [18] (hex: 9F12FF - regardless of definite/indefinite array) against CDDL tester = [18/12] which should be valid.

But I am getting:

failed: error validating type choice at cbor location : expected value 12, got Array([Integer(Integer(18))])

and validating CBOR [12] (hex: 9F0CFF) against the same CDDL also yields:

failed: error validating type choice at cbor location /0: expected value 18, got Integer(12)
error validating type choice at cbor location : expected value 12, got Array([Integer(Integer(12))])

but validating CBOR [12] and [18] against CDDL tester = [18//12] works.

According to the specification type choices should have worked, am I mistaken or is this something that is currently not supported in this package?

Thank you for your great work!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions