Dominik Lemberger
Dominik Lemberger

Reputation: 2426

Is there an Unsigned Integer in JSON Schema

I just created my JSON Schema and I can't find if there is some kind of unsigned integer.

Is there an unsigned integer type available in JSON Schema?

Upvotes: 5

Views: 6823

Answers (1)

erosb
erosb

Reputation: 3141

No, there isn't. Check the 'type' section for details. But you can do

{
   "type" : "integer",
   "minimum" : 0
}

Upvotes: 8

Related Questions