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

Method UnmarshalJSON

tools/types/datetime.go:114–120  ·  view source on GitHub ↗

UnmarshalJSON implements the [json.Unmarshaler] interface.

(b []byte)

Source from the content-addressed store, hash-verified

112
113// UnmarshalJSON implements the [json.Unmarshaler] interface.
114func (d *DateTime) UnmarshalJSON(b []byte) error {
115 var raw string
116 if err := json.Unmarshal(b, &raw); err != nil {
117 return err
118 }
119 return d.Scan(raw)
120}
121
122// Value implements the [driver.Valuer] interface.
123func (d DateTime) Value() (driver.Value, error) {

Callers 1

Calls 1

ScanMethod · 0.95

Tested by 1