Throwing a validation error is not always the most desirable behavior when deseriailzing DID documents. This PR adds a non-conformant doc object as a fallback when all other validation fails. It attempts to make the resulting document as usable as possible without making assertions about what is or is not present in the document.
Use pydid.deserialize_document(value) to get this fallback behavior. Use pydid.deserialize_document(value, strict=True) to keep strict validation behavior.
Throwing a validation error is not always the most desirable behavior when deseriailzing DID documents. This PR adds a non-conformant doc object as a fallback when all other validation fails. It attempts to make the resulting document as usable as possible without making assertions about what is or is not present in the document.
Use
pydid.deserialize_document(value)
to get this fallback behavior. Usepydid.deserialize_document(value, strict=True)
to keep strict validation behavior.