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

Method MarshalJSON

model/value_float.go:36–38  ·  view source on GitHub ↗

MarshalJSON implements json.Marshaler.

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected