numbers: do not use (unsigned) int for numbers but always double
fixes #27
This commit is contained in:
parent
5f199477d4
commit
a5521b4b02
@ -231,13 +231,13 @@ void validate_numeric(const json &schema, const std::string &name, double value)
|
|||||||
void validate_integer(const json &instance, const json &schema, const std::string &name)
|
void validate_integer(const json &instance, const json &schema, const std::string &name)
|
||||||
{
|
{
|
||||||
validate_type(schema, "integer", name);
|
validate_type(schema, "integer", name);
|
||||||
validate_numeric(schema, name, instance.get<int>());
|
validate_numeric(schema, name, instance.get<double>());
|
||||||
}
|
}
|
||||||
|
|
||||||
void validate_unsigned(const json &instance, const json &schema, const std::string &name)
|
void validate_unsigned(const json &instance, const json &schema, const std::string &name)
|
||||||
{
|
{
|
||||||
validate_type(schema, "integer", name);
|
validate_type(schema, "integer", name);
|
||||||
validate_numeric(schema, name, instance.get<unsigned>());
|
validate_numeric(schema, name, instance.get<double>());
|
||||||
}
|
}
|
||||||
|
|
||||||
void validate_float(const json &instance, const json &schema, const std::string &name)
|
void validate_float(const json &instance, const json &schema, const std::string &name)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user