MCPcopy
hub / github.com/tuna/tunasync / MarshalJSON

Method MarshalJSON

internal/msg.go:89–94  ·  view source on GitHub ↗

Marshal and Unmarshal for CmdVerb

()

Source from the content-addressed store, hash-verified

87
88// Marshal and Unmarshal for CmdVerb
89func (s CmdVerb) MarshalJSON() ([]byte, error) {
90 buffer := bytes.NewBufferString(`"`)
91 buffer.WriteString(s.String())
92 buffer.WriteString(`"`)
93 return buffer.Bytes(), nil
94}
95
96func (s *CmdVerb) UnmarshalJSON(b []byte) error {
97 var j string

Callers

nothing calls this directly

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected