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

Method MarshalJSON

tools/types/datetime.go:109–111  ·  view source on GitHub ↗

MarshalJSON implements the [json.Marshaler] interface.

()

Source from the content-addressed store, hash-verified

107
108// MarshalJSON implements the [json.Marshaler] interface.
109func (d DateTime) MarshalJSON() ([]byte, error) {
110 return []byte(`"` + d.String() + `"`), nil
111}
112
113// UnmarshalJSON implements the [json.Unmarshaler] interface.
114func (d *DateTime) UnmarshalJSON(b []byte) error {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected