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

Method MarshalJSON

model/value_float.go:35–37  ·  view source on GitHub ↗

MarshalJSON implements json.Marshaler.

()

Source from the content-addressed store, hash-verified

33
34// MarshalJSON implements json.Marshaler.
35func (v SampleValue) MarshalJSON() ([]byte, error) {
36 return json.Marshal(v.String())
37}
38
39// UnmarshalJSON implements json.Unmarshaler.
40func (v *SampleValue) UnmarshalJSON(b []byte) error {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected