func()

in record.go [36:51]


func (r *Record) UnmarshalJSON(data []byte) error {
	if r == nil {
		return errors.New("record: can't unmarshal to a nil struct")
	}
	if data == nil {
		return errors.New("record: can't unmarshal to a nil byte array")
	}
	var jsonMap map[string]interface{}
	err := json.Unmarshal(data, &jsonMap)
	if err != nil {
		return err
	}

	r.fromJSONMap(jsonMap)
	return nil
}