MCPcopy Index your code
hub / github.com/devfeel/mapper / UnmarshalJSON

Method UnmarshalJSON

jsontime.go:19–23  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

17}
18
19func (t *JSONTime) UnmarshalJSON(data []byte) (err error) {
20 now, err := time.ParseInLocation(`"`+timeJSONFormat+`"`, string(data), time.Local)
21 *t = JSONTime(now)
22 return
23}
24
25func (t JSONTime) MarshalJSON() ([]byte, error) {
26 b := make([]byte, 0, len(timeJSONFormat)+2)

Callers

nothing calls this directly

Calls 1

JSONTimeTypeAlias · 0.85

Tested by

no test coverage detected