Marshalling and unmarshalling requires a DID to have a minimum length of 7. It's possible to create an invalid DID Document and marshal it to JSON, it can then never be unmarshalled....