Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
Notes change in integer behavior between 4 and 6
Browse files Browse the repository at this point in the history
`1.0` was not a valid integer in draft-04 and earlier, but is in draft-06 and later.
  • Loading branch information
toddobryan committed Sep 15, 2019
1 parent edeae28 commit 06ed5c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions draft-06/json-schema-release-notes.md
Expand Up @@ -25,6 +25,7 @@ keyword | change | consequence
`"$id"` | replaces `"id"` | behavior is identical, `$` prefix matches the other two core keywords
`"$ref"` | only allowed where a schema is expected | it is now possible to describe instance properties named `"$ref"`
`"exclusiveMinimum"` and `"exclusiveMaximum"` | changed from a boolean to a number to be consistent with the principle of keyword independence | wherever one of these would be true before, change the value to the corresponding `"minimum"` or `"maximum"` value and remove the `"minimum"`/`"maximum"` keyword
`"type"` | definition of `"integer"` | in draft-04, `"integer"` is listed as a primitive type and defined as "a JSON number without a fraction or exponent part"; in draft-06, `"integer"` is not considered a primitive type and is only defined in the section for keyword `"type"` as "any number with a zero fractional part"; `1.0` is thus not a valid `"integer"` type in draft-04 and earlier, but is a valid `"integer"` type in draft-06 and later; note that both drafts say that integers SHOULD be encoded in JSON without fractional parts

#### Additions and backwards-compatible changes

Expand Down

0 comments on commit 06ed5c2

Please sign in to comment.