You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Number
Min *float64 `json:"minimum,omitempty" yaml:"minimum,omitempty"`
Max *float64 `json:"maximum,omitempty" yaml:"maximum,omitempty"`
MultipleOf *float64 `json:"multipleOf,omitempty" yaml:"multipleOf,omitempty"`
I can see the schema of number is float64, and the default json decoder marshal number into float64, however there will be precision problems between float64 and int64, so the validation may not be correct.
The text was updated successfully, but these errors were encountered:
Indeed! I plan on moving schema validation to https://github.com/xeipuuv/gojsonschema which takes proper care of this using Reals.
Now I'm wondering whether all float64 field should actually be reals. I don't think any JSON Schema Draft specifies a precision (and just assumes that of the js runtime). I know this was discussed and the above mentioned repo. So this will surely follow that discussion.
I can see the schema of number is float64, and the default json decoder marshal number into float64, however there will be precision problems between float64 and int64, so the validation may not be correct.
The text was updated successfully, but these errors were encountered: