// UnmarshalJSON implements the encoding/json Unmarshaler interface. It expects
// to receive a valid JSON value, and will assign that value to this RawJSON. If
// the incoming JSON is the 'null' keyword, j will be nulled. UnmarshalJSON will
// validate the incoming JSON as part of the "Is this JSON null?" check.
UnmarshalJSON implements the encoding/json Unmarshaler interface. It expects
to receive a valid JSON value, and will assign that value to this RawJSON. If
the incoming JSON is the 'null' keyword, j will be nulled. UnmarshalJSON will
validate the incoming JSON as part of the "Is this JSON null?" check.
// UnmarshalJSON implements the encoding / json Unmarshaler interface . It expects // to receive a valid JSON value and will assign that value to this RawJSON . If // the incoming JSON is the ' null ' keyword j will be nulled . UnmarshalJSON will // validate the incoming JSON as part of the " Is this JSON null? " check .
func (j *RawJSON) UnmarshalJSON(data []byte) error {
	if j == nil {
		return fmt.Errorf("null.RawJSON: UnmarshalJSON called on nil pointer")
	}
	var k interface{}
	if err := json.Unmarshal(data, &k); err != nil {
		return err
	}
	if k == nil {
		j.JSON = nil
		j.Valid = false
		return nil
	}
	j.JSON.Set(data)
	j.Valid = true
	return nil
}
func ( j * RawJSON ) UnmarshalJSON ( data [ ] byte ) error { if j == nil { return fmt . Errorf ( " " ) } var k interface { } if err := json . Unmarshal ( data , & k ) ; err != nil { return err } if k == nil { j . JSON = nil j . Valid = false return nil } j . JSON . Set ( data ) j . Valid = true return nil }
UnmarshalJSON implements the encoding/json Unmarshaler interface.
UnmarshalJSON implements the encoding / json Unmarshaler interface .