Skip to content

Commit b2db20e

Browse files
authored
Merge pull request #16 from json-structure/add-integer-type
2 parents 5c84ab7 + 05b5b7d commit b2db20e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

draft-vasters-json-structure-core.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,15 @@ decimal number (base-10) and therefore cannot accurately represent all possible
243243
values of IEE754 floating-point numbers (base-2), in spite of JSON `number`
244244
leaning on the IEEE754 standard as a reference for the value space.
245245

246+
#### `integer` {#integer}
247+
248+
An alias for `int32` ({{int32}}), provided for compatibility with JSON Schema.
249+
250+
- Base type: `number`
251+
- Constraints:
252+
- The numeric literal MUST be in the range -2³¹ to 2³¹–1.
253+
- No decimal points or quotes are allowed.
254+
246255
#### `boolean` {#boolean}
247256

248257
A literal `true` or `false` (without quotes).
@@ -1069,7 +1078,7 @@ provides a mechanism for importing definitions from external schemas.
10691078
MUST NOT be referenced externally.
10701079
- Primitive and compound type declarations are confined to this specification.
10711080
- Defined types:
1072-
- **JSON Primitives:** `string`, `number`, `boolean`, `null`.
1081+
- **JSON Primitives:** `string`, `number`, `integer`, `boolean`, `null`.
10731082
- **Extended Primitives:** `int32`, `uint32`, `int64`, `uint64`, `int128`,
10741083
`uint128`, `float`, `double`, `decimal`, `date`, `datetime`, `time`,
10751084
`duration`, `uuid`, `uri`, `binary`, `jsonpointer`.

0 commit comments

Comments
 (0)