You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an example in which different branches allow different types, validation of an AIU valid data structure succeeds when processing JSON, but fails when processing CBOR.
$ cddl validate --cddl schema.cddl --json features.json
[INFO] Root typefor validation: root
[INFO] Validation of "features.json" is successful
Fails for CBOR:
$ cddl validate --cddl schema.cddl --cbor features.cbor
[INFO] Root typefor validation: root
[ERROR] Validation of "features.cbor" failed: error validating at cbor location /Map([]): expected object value of type tstr, got object
Further information / context
I'm aware that this is not great CDDL -- it's capturing a particular snapshot of development, and we'll move on to something that's easier to parse as RIOT-OS/RIOT#20366 progresses. Nonetheless, AIU this is a bug in the CDDL implementation (which I'm actually using through pycddl, and thus can't even work around by using JSON for the data that's originally YAML anyway).
The text was updated successfully, but these errors were encountered:
In an example in which different branches allow different types, validation of an AIU valid data structure succeeds when processing JSON, but fails when processing CBOR.
Inputs
features.json:
{"Foo": {}}
features.cbor:
schema.cddl:
Failure mode
Works for JSON:
Fails for CBOR:
Further information / context
I'm aware that this is not great CDDL -- it's capturing a particular snapshot of development, and we'll move on to something that's easier to parse as RIOT-OS/RIOT#20366 progresses. Nonetheless, AIU this is a bug in the CDDL implementation (which I'm actually using through pycddl, and thus can't even work around by using JSON for the data that's originally YAML anyway).
The text was updated successfully, but these errors were encountered: