|
2 | 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", |
3 | 3 | "title": "W3C XML Schema unsignedLong", |
4 | 4 | "description": "Represents 64-bit unsigned integers (§3.3.21)", |
5 | | - "$comment": "XML Schema unsignedLong supports the 64-bit unsigned range, but JSON Schema's integer type is limited to signed 64-bit integers. This schema uses string representation to maintain full XML Schema conformance", |
6 | | - "examples": [ |
7 | | - "0", |
8 | | - "1", |
9 | | - "18446744073709551615", |
10 | | - "9223372036854775808", |
11 | | - "4294967296" |
12 | | - ], |
| 5 | + "$comment": "XML Schema supports arbitrary precision integers. JSON's number type is limited to the safe integer range (±2^53-1) per IEEE 754. To properly validate arbitrary precision integers, use a JSON Schema evaluator that supports arbitrary precision integer handling", |
| 6 | + "examples": [ 0, 1, 9007199254740991, 4294967296 ], |
13 | 7 | "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", |
14 | 8 | "x-links": [ "https://www.w3.org/TR/xmlschema-2/#unsignedLong" ], |
15 | | - "type": "string", |
16 | | - "anyOf": [ |
17 | | - { |
18 | | - "pattern": "^0$" |
19 | | - }, |
20 | | - { |
21 | | - "pattern": "^[1-9][0-9]{0,18}$" |
22 | | - }, |
23 | | - { |
24 | | - "pattern": "^1[0-7][0-9]{18}$" |
25 | | - }, |
26 | | - { |
27 | | - "pattern": "^18[0-3][0-9]{17}$" |
28 | | - }, |
29 | | - { |
30 | | - "pattern": "^184[0-3][0-9]{16}$" |
31 | | - }, |
32 | | - { |
33 | | - "pattern": "^1844[0-5][0-9]{15}$" |
34 | | - }, |
35 | | - { |
36 | | - "pattern": "^18446[0-6][0-9]{14}$" |
37 | | - }, |
38 | | - { |
39 | | - "pattern": "^184467[0-3][0-9]{13}$" |
40 | | - }, |
41 | | - { |
42 | | - "pattern": "^1844674[0-3][0-9]{12}$" |
43 | | - }, |
44 | | - { |
45 | | - "pattern": "^184467440[0-6][0-9]{10}$" |
46 | | - }, |
47 | | - { |
48 | | - "pattern": "^1844674407[0-2][0-9]{9}$" |
49 | | - }, |
50 | | - { |
51 | | - "pattern": "^18446744073[0-6][0-9]{8}$" |
52 | | - }, |
53 | | - { |
54 | | - "pattern": "^1844674407370[0-8][0-9]{6}$" |
55 | | - }, |
56 | | - { |
57 | | - "pattern": "^18446744073709[0-4][0-9]{5}$" |
58 | | - }, |
59 | | - { |
60 | | - "pattern": "^184467440737095[0-4][0-9]{4}$" |
61 | | - }, |
62 | | - { |
63 | | - "pattern": "^1844674407370955[0][0-9]{3}$" |
64 | | - }, |
65 | | - { |
66 | | - "pattern": "^18446744073709551[0-5][0-9]{2}$" |
67 | | - }, |
68 | | - { |
69 | | - "pattern": "^184467440737095516[0][0-9]$" |
70 | | - }, |
71 | | - { |
72 | | - "pattern": "^1844674407370955161[0-5]$" |
73 | | - } |
74 | | - ] |
| 9 | + "type": "integer", |
| 10 | + "minimum": 0 |
75 | 11 | } |
0 commit comments