w3c / vc-data-model-2.0-test-suite

W3C Verifiable Credentials v2.0 test suite
https://w3c.github.io/vc-data-model-2.0-test-suite/
Other
11 stars 11 forks source link

Testing optional properties with null #29

Open filip26 opened 1 year ago

filip26 commented 1 year ago

Hi, I'm not sure about this test input/credential-id-nonidentifier-fail.json.

It expects to fail when null on an optional property is set. Using null to test a required property is fine, but in a case of optional one, it might not be a good idea because many JSON and JSON-LD processors skip/omit properties with null. e.g. sometimes a special configuration is required to force a JSON parser to keep nulls.