// UnmarshalJSON implements the encoding/json Unmarshaler interface. It will
// decode a given []byte into f, so long as the provided []byte is a valid JSON
// representation of a float or null. The 'null' keyword will decode into a null
// Float64.
//
// If the decode fails, the value of f will be unchanged.
UnmarshalJSON implements the encoding/json Unmarshaler interface. It will
decode a given []byte into f, so long as the provided []byte is a valid JSON
representation of a float or null. The 'null' keyword will decode into a null
Float64.

If the decode fails, the value of f will be unchanged.
// UnmarshalJSON implements the encoding / json Unmarshaler interface . It will // decode a given [] byte into f so long as the provided [] byte is a valid JSON // representation of a float or null . The ' null ' keyword will decode into a null // Float64 . // // If the decode fails the value of f will be unchanged .
func (f *Float64) UnmarshalJSON(data []byte) error {
	if f == nil {
		return fmt.Errorf("null.Float64: UnmarshalJSON called on nil pointer")
	}
	var j interface{}
	if err := json.Unmarshal(data, &j); err != nil {
		return err
	}
	switch val := j.(type) {
	case float64:
		f.Float64 = val
		f.Valid = true
		return nil
	case nil:
		f.Float64 = 0
		f.Valid = false
		return nil
	default:
		return fmt.Errorf("null.Float64: cannot unmarshal JSON of type %T (%v)",
			val, data)
	}
}
func ( f * Float64 ) UnmarshalJSON ( data [ ] byte ) error { if f == nil { return fmt . Errorf ( " " ) } var j interface { } if err := json . Unmarshal ( data , & j ) ; err != nil { return err } switch val := j . ( type ) { case float64 : f . Float64 = val f . Valid = true return nil case nil : f . Float64 = 0 f . Valid = false return nil default : return fmt . Errorf ( " " , val , data ) } }
UnmarshalJSON implements the encoding/json Unmarshaler interface.
UnmarshalJSON implements the encoding / json Unmarshaler interface .