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

Method UnmarshalJSON

model/value.go:276–279  ·  view source on GitHub ↗

UnmarshalJSON implements json.Unmarshaler.

(b []byte)

Source from the content-addressed store, hash-verified

274
275// UnmarshalJSON implements json.Unmarshaler.
276func (s *String) UnmarshalJSON(b []byte) error {
277 v := [...]any{&s.Timestamp, &s.Value}
278 return json.Unmarshal(b, &v)
279}
280
281// Vector is basically only an alias for Samples, but the
282// contract is that in a Vector, all Samples have the same timestamp.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected