3 ms·
If you want something stricter, specify it in the JSON Schema and use that[1]. You could declare your own "int32" type[2] for example, and use that. Then valid
by magicalhippo 3y ago
If you want something stricter, specify it in the JSON Schema and use that[1].
You could declare your own "int32" type[2] for example, and use that. Then validate the input JSON against the schema before parsing it further.
[1]: https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01#name-validation-keywords-for-num https://datatracker.ietf.org/doc/html/draft-bhutton-json-sch...
[2]: https://json-schema.org/draft/2020-12/json-schema-core.html#name-schema-re-use-with-defs https://json-schema.org/draft/2020-12/json-schema-core.html#...