method
Value.UnmarshalJSON
Decode any JSON value into a Value.
Example
var value store.Value
err := value.UnmarshalJSON(data)Arguments
| Argument | Type | Description |
|---|---|---|
data | []byte | One complete JSON value. |
Returns
An error for invalid JSON or a number outside the float64 range.
errorHow it works
Objects become ValueObject, arrays ValueList, and numbers float64 ValueNumber. Input is accepted and decoded exactly as encoding/json would, including replacing invalid UTF-8 with U+FFFD.
Full signature
func (value *Value) UnmarshalJSON(data []byte) errorRelated types
ValueAn immutable scalar, object, list, or populated document value.