MCPcopy Index your code
hub / github.com/coder/coder / MarshalJSON

Method MarshalJSON

codersdk/allowlist.go:39–41  ·  view source on GitHub ↗

MarshalJSON encodes as a JSON string: " : ".

()

Source from the content-addressed store, hash-verified

37
38// MarshalJSON encodes as a JSON string: "<type>:<id>".
39func (t APIAllowListTarget) MarshalJSON() ([]byte, error) {
40 return json.Marshal(t.String())
41}
42
43// UnmarshalJSON decodes from a JSON string: "<type>:<id>".
44func (t *APIAllowListTarget) UnmarshalJSON(b []byte) error {

Callers

nothing calls this directly

Calls 2

StringMethod · 0.95
MarshalMethod · 0.45

Tested by

no test coverage detected