MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / UnmarshalJSON

Method UnmarshalJSON

gateway/resource.go:117–131  ·  view source on GitHub ↗
(bytes []byte)

Source from the content-addressed store, hash-verified

115}
116
117func (d *DynamicRelease) UnmarshalJSON(bytes []byte) error {
118 basicInfo := new(BasicItem)
119 err := json.Unmarshal(bytes, basicInfo)
120 if err != nil {
121 return err
122 }
123 tmp := make(map[string]interface{})
124 err = json.Unmarshal(bytes, &tmp)
125 if err != nil {
126 return err
127 }
128 d.BasicItem = basicInfo
129 d.Attr = tmp
130 return nil
131}
132
133type ServiceRelease struct {
134 ID string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected