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

Method UnmarshalJSON

model/value.go:297–300  ·  view source on GitHub ↗

UnmarshalJSON implements json.Unmarshaler.

(b []byte)

Source from the content-addressed store, hash-verified

295
296// UnmarshalJSON implements json.Unmarshaler.
297func (s *String) UnmarshalJSON(b []byte) error {
298 v := [...]interface{}{&s.Timestamp, &s.Value}
299 return json.Unmarshal(b, &v)
300}
301
302// Vector is basically only an alias for Samples, but the
303// 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