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

Method UnmarshalJSON

model/value_float.go:86–89  ·  view source on GitHub ↗

UnmarshalJSON implements json.Unmarshaler.

(b []byte)

Source from the content-addressed store, hash-verified

84
85// UnmarshalJSON implements json.Unmarshaler.
86func (s *SamplePair) UnmarshalJSON(b []byte) error {
87 v := [...]json.Unmarshaler{&s.Timestamp, &s.Value}
88 return json.Unmarshal(b, &v)
89}
90
91// Equal returns true if this SamplePair and o have equal Values and equal
92// Timestamps. The semantics of Value equality is defined by SampleValue.Equal.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected