// Unmarshals an instant as seconds from a float64 value.
Unmarshals an instant as seconds from a float64 value.
// Unmarshals an instant as seconds from a float64 value .
func (t *instant) UnmarshalJSON(s []byte) error {
	if t != nil {
		var v float64
		_, err := fmt.Sscanf(string(s), "%f", &v)
		if err != nil {
			return err
		}
		*t = instant(v * float64(time.Second))
	}
	return nil
}
func ( t * instant ) UnmarshalJSON ( s [ ] byte ) error { if t != nil { var v float64 _ , err := fmt . Sscanf ( string ( s ) , " " , & v ) if err != nil { return err } * t = instant ( v * float64 ( time . Second ) ) } return nil }
Unmarshals an instant as seconds from a float64 value.
Unmarshals an instant as seconds from a float64 value .