Integer type

Description for integer type

The integer type is a subtype of number type used for validating only integer numbers.

  "type": "integer"
Input Status
5 valid - integer
-10 valid - integer
5.0 invalid - is float
"123" invalid - is string
null invalid - is null

This type was added in order to simplify the writing of JSON schemas, because in reality it is just syntactic sugar for the number type having the keyword multipleOf set to 1.

  "type": "number",
  "multipleOf": 1

Validation keywords

The integer type supports all keywords that number type supports.

On this page