MCPcopy Create free account
hub / github.com/DoNewsCode/core / MarshalJSON

Method MarshalJSON

config/time.go:36–38  ·  view source on GitHub ↗

MarshalJSON implements json.Marshaler

()

Source from the content-addressed store, hash-verified

34
35// MarshalJSON implements json.Marshaler
36func (d Duration) MarshalJSON() ([]byte, error) {
37 return json.Marshal(d.String())
38}
39
40// UnmarshalJSON implements json.Unmarshaler
41func (d *Duration) UnmarshalJSON(b []byte) error {

Callers

nothing calls this directly

Calls 2

MarshalMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected