Closed
Description
We have the use case of wanting to enforce numbers having no more than 2 decimal places so we're using the multipleOf
keyword with .01
to try to achieve this. Unfortunately it fails in unexpected ways.
There is a well known issue with multipleOf
keyword when used with floating point numbers:
- multipleOf and floating point rounding errors json-schema-org/json-schema-spec#312
- More lenient float multipleOf validation python-jsonschema/jsonschema#878
Do you think this is something that this parser would like to fix or should we just use strings with regexes to achieve a similar result?