method
Values.UnmarshalJSON
Decode a JSON object into the field map.
Example
var values store.Values
err := values.UnmarshalJSON(data)Arguments
| Argument | Type | Description |
|---|---|---|
data | []byte | A JSON object or null. |
Returns
An error for invalid JSON or a non-object value.
errorHow it works
Like encoding/json for maps, it adds to existing entries and JSON null sets the map to nil. Other JSON values return an error.
Full signature
func (values *Values) UnmarshalJSON(data []byte) errorRelated types
ValuesA map of field names to typed values.