MCPcopy Create free account
hub / github.com/abice/go-enum / UnmarshalJSON

Method UnmarshalJSON

example/sql_enum.go:230–239  ·  view source on GitHub ↗

UnmarshalJSON correctly deserializes a NullProjectStatus from JSON.

(b []byte)

Source from the content-addressed store, hash-verified

228
229// UnmarshalJSON correctly deserializes a NullProjectStatus from JSON.
230func (n *NullProjectStatus) UnmarshalJSON(b []byte) error {
231 n.Set = true
232 var x interface{}
233 err := json.Unmarshal(b, &x)
234 if err != nil {
235 return err
236 }
237 err = n.Scan(x)
238 return err
239}
240
241type NullProjectStatusStr struct {
242 NullProjectStatus

Callers

nothing calls this directly

Calls 1

ScanMethod · 0.95

Tested by

no test coverage detected