MCPcopy Create free account
hub / github.com/devfile/api / UnmarshalJSON

Method UnmarshalJSON

pkg/attributes/attributes.go:40–42  ·  view source on GitHub ↗

UnmarshalJSON implements custom JSON unmarshalling to support free-form attributes

(data []byte)

Source from the content-addressed store, hash-verified

38// UnmarshalJSON implements custom JSON unmarshalling
39// to support free-form attributes
40func (attributes *Attributes) UnmarshalJSON(data []byte) error {
41 return json.Unmarshal(data, (*map[string]apiext.JSON)(attributes))
42}
43
44// Exists returns `true` if the attribute with the given key
45// exists in the attributes map.

Callers 1

TestDecodeAttributeFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestDecodeAttributeFunction · 0.64