MCPcopy Create free account
hub / github.com/google/uuid / UnmarshalJSON

Method UnmarshalJSON

null.go:110–118  ·  view source on GitHub ↗

UnmarshalJSON implements json.Unmarshaler.

(data []byte)

Source from the content-addressed store, hash-verified

108
109// UnmarshalJSON implements json.Unmarshaler.
110func (nu *NullUUID) UnmarshalJSON(data []byte) error {
111 if bytes.Equal(data, jsonNull) {
112 *nu = NullUUID{}
113 return nil // valid null UUID
114 }
115 err := json.Unmarshal(data, &nu.UUID)
116 nu.Valid = err == nil
117 return err
118}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected