-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When originally implmented, psatoken eschewed the "standard" marshaler/unmarshaler interfaces defined by the encoding libraries (e.g. UnmarshalCBOR) and defined its own methods (e.g FromCBOR) that tied validation and marshaling. This proved problematic in some situations, so "unvalidated" versions of the methods were later added (e.g. FromUnvalidatedCBOR), which did not do validation as part marshaling. As a result, the current marshaling solution deviates from Golang norms and is confusing.
Proposed solution: we should switch to standard (un)marshaler interface implementations (i.e. just implement MarshalCBOR, UnmarshalCBOR, MarshalJSON, and UnmarshalJSON), and perform validation as a distinct operation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request