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

Method UnmarshalJSON

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

Source from the content-addressed store, hash-verified

8type Kind int
9
10func (k *Kind) UnmarshalJSON(bytes []byte) error {
11 str := ""
12
13 err := json.Unmarshal(bytes, &str)
14 if err != nil {
15 return err
16 }
17 *k = ParseKind(str)
18 return nil
19}
20
21func (k *Kind) MarshalJSON() ([]byte, error) {
22 return json.Marshal(k.String())

Callers

nothing calls this directly

Calls 1

ParseKindFunction · 0.85

Tested by

no test coverage detected