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

Method MarshalJSON

config/http_config.go:231–236  ·  view source on GitHub ↗

MarshalJSON implements the json.Marshaler interface for URL.

()

Source from the content-addressed store, hash-verified

229
230// MarshalJSON implements the json.Marshaler interface for URL.
231func (u URL) MarshalJSON() ([]byte, error) {
232 if u.URL != nil {
233 return json.Marshal(u.String())
234 }
235 return []byte("null"), nil
236}
237
238// OAuth2 is the oauth2 client configuration.
239type OAuth2 struct {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected