MCPcopy Create free account
hub / github.com/prometheus/common / MarshalJSON

Method MarshalJSON

model/value.go:292–294  ·  view source on GitHub ↗

MarshalJSON implements json.Marshaler.

()

Source from the content-addressed store, hash-verified

290
291// MarshalJSON implements json.Marshaler.
292func (s String) MarshalJSON() ([]byte, error) {
293 return json.Marshal([]interface{}{s.Timestamp, s.Value})
294}
295
296// UnmarshalJSON implements json.Unmarshaler.
297func (s *String) UnmarshalJSON(b []byte) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected