MCPcopy Create free account
hub / github.com/dolthub/doltgresql / MarshalJSON

Method MarshalJSON

postgres/parser/uuid/sql.go:96–102  ·  view source on GitHub ↗

MarshalJSON marshals the NullUUID as null or the nested UUID

()

Source from the content-addressed store, hash-verified

94
95// MarshalJSON marshals the NullUUID as null or the nested UUID
96func (u NullUUID) MarshalJSON() ([]byte, error) {
97 if !u.Valid {
98 return json.Marshal(nil)
99 }
100
101 return json.Marshal(u.UUID)
102}
103
104// UnmarshalJSON unmarshals a NullUUID
105func (u *NullUUID) UnmarshalJSON(b []byte) error {

Callers 1

receiveMessageMethod · 0.45

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected