UnmarshalJSON implements custom JSON unmarshalling to support free-form attributes
(data []byte)
| 38 | // UnmarshalJSON implements custom JSON unmarshalling |
| 39 | // to support free-form attributes |
| 40 | func (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. |
no outgoing calls