func (n *NullInt16) UnmarshalJSON(data []byte) error {
	if bytes.Equal(data, []byte("null")) {
		*n = NullInt16{}
		return nil
	}

	var res int16

	err := json.Unmarshal(data, &res)
	if err == nil {
		*n = NullInt16{Int16: res, Valid: true}
		return nil
	}

	var res2 struct {
		Int16 int16 `json:"int16"`
		Valid bool  `json:"valid"`
	}
	err = json.Unmarshal(data, &res2)
	if err == nil {
		*n = NullInt16{Int16: res2.Int16, Valid: res2.Valid}
		return nil
	}
	return err
}
// UnmarshalJSON - unmarshaller for json
unmarshaller for json
// UnmarshalJSON - unmarshaller for json
func (n *NullInt16) UnmarshalJSON(data []byte) error {
	if bytes.Equal(data, []byte("null")) {
		*n = NullInt16{}
		return nil
	}
	var res int16
	err := json.Unmarshal(data, &res)
	if err == nil {
		*n = NullInt16{Int16: res, Valid: true}
		return nil
	}
	var res2 struct {
		Int16 int16 `json:"int16"`
		Valid bool  `json:"valid"`
	}
	err = json.Unmarshal(data, &res2)
	if err == nil {
		*n = NullInt16{Int16: res2.Int16, Valid: res2.Valid}
		return nil
	}
	return err
}
func ( n * NullInt16 ) UnmarshalJSON ( data [ ] byte ) error { if bytes . Equal ( data , [ ] byte ( " " ) ) { * n = NullInt16 { } return nil } var res int16 err := json . Unmarshal ( data , & res ) if err == nil { * n = NullInt16 { Int16 : res , Valid : true } return nil } var res2 struct { Int16 int16 `json:"int16"` Valid bool `json:"valid"` } err = json . Unmarshal ( data , & res2 ) if err == nil { * n = NullInt16 { Int16 : res2 . Int16 , Valid : res2 . Valid } return nil } return err }
unmarshaller for json
unmarshaller for json