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
Implement support for the types defined in the web5-spec repo (at the time of this ticket, that'll be, DIDs and VCs)
During deserialization of a type, given the string/byte-array/whatever which is being deserialized has a property type which is different than what we have defined in the web5-spec repo, then throw an exception
Consider if JSON Schemas can be used prior-to or during deserialization as a mechanism of implementing this expected behavior (web5-spec issue for tracking) -- rather than writing custom JSON unmarshallers, perhaps we could validate the type with a single JSON Schema validation call
Note: the only mixed type I see at this time is the issuer in the VC Data Model. As for how we will implement a mixed type here in golang, we do not have a set consensus, but have two separate proposals:
Rely on the caller to perform type assertions; From this PR notice the dids/didcore/document_test.go or dids/didcore/examples_test.go as a reference example
We should use the JSON schema to enforce existence requirements, so no need to write custom json marshallers/unmarshallers in this work. Wrote a new ticket for JSON Schema validation #131
This ticket will take the place of the following
Also relevant as a source of inspiration for this work is this PR #104
The source of truth as to what web5 will support is codified in the web5-spec repo, and initially created within this PR.
The requirements are as follows:
Note: the only mixed type I see at this time is the
issuer
in the VC Data Model. As for how we will implement a mixed type here in golang, we do not have a set consensus, but have two separate proposals:dids/didcore/document_test.go
ordids/didcore/examples_test.go
as a reference exampleThis work may prove too unwieldy for a single PR, if so then piece meal PRs are appropriate
The text was updated successfully, but these errors were encountered: