MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / UnmarshalJSON

Method UnmarshalJSON

types/account.go:83–90  ·  view source on GitHub ↗

UnmarshalJSON implements the json.Unmarshler interface.

(data []byte)

Source from the content-addressed store, hash-verified

81
82// UnmarshalJSON implements the json.Unmarshler interface.
83func (r *UserPermissionRole) UnmarshalJSON(data []byte) (err error) {
84 var s string
85 if err = json.Unmarshal(data, &s); err != nil {
86 return
87 }
88 r.FromString(s)
89 return
90}
91
92// MarshalJSON implements the json.Marshaler interface.
93func (r UserPermissionRole) MarshalJSON() ([]byte, error) {

Callers 1

Calls 2

FromStringMethod · 0.95
UnmarshalMethod · 0.80

Tested by 1