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

Method MarshalJSON

model/value_type.go:43–45  ·  view source on GitHub ↗

MarshalJSON implements json.Marshaler.

()

Source from the content-addressed store, hash-verified

41
42// MarshalJSON implements json.Marshaler.
43func (et ValueType) MarshalJSON() ([]byte, error) {
44 return json.Marshal(et.String())
45}
46
47func (et *ValueType) UnmarshalJSON(b []byte) error {
48 var s string

Callers

nothing calls this directly

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected