MCPcopy Create free account
hub / github.com/cli/cli / MarshalJSON

Method MarshalJSON

pkg/iostreams/untrusted.go:74–76  ·  view source on GitHub ↗

MarshalJSON emits the raw content as a JSON string so a value round-trips faithfully through encode/decode.

()

Source from the content-addressed store, hash-verified

72// MarshalJSON emits the raw content as a JSON string so a value round-trips
73// faithfully through encode/decode.
74func (u Untrusted) MarshalJSON() ([]byte, error) {
75 return json.Marshal(u.raw)
76}
77
78// RawBytes is Raw as a byte slice, for callers that need []byte (hashing, file
79// writes). Same terminal caveat as Raw.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected