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

Method MarshalJSON

null.go:101–107  ·  view source on GitHub ↗

MarshalJSON implements json.Marshaler.

()

Source from the content-addressed store, hash-verified

99
100// MarshalJSON implements json.Marshaler.
101func (nu NullUUID) MarshalJSON() ([]byte, error) {
102 if nu.Valid {
103 return json.Marshal(nu.UUID)
104 }
105
106 return jsonNull, nil
107}
108
109// UnmarshalJSON implements json.Unmarshaler.
110func (nu *NullUUID) UnmarshalJSON(data []byte) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected