MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / UnmarshalJSON

Method UnmarshalJSON

model/plugin_model/type.go:103–111  ·  view source on GitHub ↗
(bytes []byte)

Source from the content-addressed store, hash-verified

101type Status int
102
103func (s *Status) UnmarshalJSON(bytes []byte) error {
104 str := ""
105 err := json.Unmarshal(bytes, &str)
106 if err != nil {
107 return err
108 }
109 *s = ParseStatus(str)
110 return nil
111}
112
113func (s *Status) MarshalJSON() ([]byte, error) {
114 return json.Marshal(s.String())

Callers

nothing calls this directly

Calls 1

ParseStatusFunction · 0.85

Tested by

no test coverage detected