func (i *Interval) UnmarshalJSON(src []byte) error {
	num, err := strconv.Atoi(string(src))
	if err != nil {
		return err
	}
	var ivl Interval
	if num < 0 {
		ivl = -Interval(num) * Second
	} else {
		ivl = Interval(num) * Day
	}
	*i = ivl
	return nil
}
// UnmarshalJSON implements the json.Unmarshaler interface.
UnmarshalJSON implements the json.Unmarshaler interface.
// UnmarshalJSON implements the json . Unmarshaler interface .
func (i *Interval) UnmarshalJSON(src []byte) error {
	num, err := strconv.Atoi(string(src))
	if err != nil {
		return err
	}
	var ivl Interval
	if num < 0 {
		ivl = -Interval(num) * Second
	} else {
		ivl = Interval(num) * Day
	}
	*i = ivl
	return nil
}
func ( i * Interval ) UnmarshalJSON ( src [ ] byte ) error { num , err := strconv . Atoi ( string ( src ) ) if err != nil { return err } var ivl Interval if num < 0 { ivl = - Interval ( num ) * Second } else { ivl = Interval ( num ) * Day } * i = ivl return nil }
UnmarshalJSON implements the json.Unmarshaler interface.
UnmarshalJSON implements the json . Unmarshaler interface .