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

Method UnmarshalJSON

model/value_float.go:85–88  ·  view source on GitHub ↗

UnmarshalJSON implements json.Unmarshaler.

(b []byte)

Source from the content-addressed store, hash-verified

83
84// UnmarshalJSON implements json.Unmarshaler.
85func (s *SamplePair) UnmarshalJSON(b []byte) error {
86 v := [...]json.Unmarshaler{&s.Timestamp, &s.Value}
87 return json.Unmarshal(b, &v)
88}
89
90// Equal returns true if this SamplePair and o have equal Values and equal
91// 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