Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 86 lines (43 sloc) 1.767 kb
e4f7ce7 @gno Notes on RFC draft compliance
authored
1 Notes on compatability with JSON Schema RFC draft.
2
3
4 Section 5.1:
5
6 Json schema allows for an array of schemas in the "type" to indicate
7 a union. In the case that two of these sub-schema have the same type,
8 but different constraints, the validator fails. Would need to
9 backtrack (or check in parallel).
10
11 This should be made to work. <-- TODO
12
13
14 Section 5.9, 5.10:
15
16 Validator ignores minimumCanEqual, maximumCanEqal. Names changed in
17 V3, recommend against using.
18
19
20 5.13. uniqueItems
21
22 No support in place or planned for uniqueItems.
23
24 5.14. pattern
25
26 Validator accepts pcre regexen. RFC states
27
28 "Regular expressions should follow the regular expression
29 specification from ECMA 262/Perl 5."
30
31
32 5.15 maxLength/minLength
33
34 "When the instance value is a string, this indicates maximum length of
35 the string.'
36
37 RFC does not clearly define how to measure length. bytes and glyphs are
38 both reasonable choices.
39
40 Recommend use of regular expressions for this purpose.
41
42 5.17. enum
43
44 Enumerated values are validated for numbers, strings, and boolean
45 types but not maps or arrays.
46
47 Would like to support maps and arrays <== TODO
48
49
50 5.20. format
51
52 "Validators are not required to validate tha the instance values
53 conform to a format."
54
55 Orderly's validator has an interface to register functions which
56 validate named formats. When a format is not recognized, it is not
57 validated.
58
59 Again, recommend regular expressions.
60
61
62 5.21. contentEncoding
63
64 No support, although it is explicitly not required by the draft.
65
66
67 5.23. divisibleBy
68
69 As defined in RFC, always validates. Plan to silently ignore unless
70 RFC gets text that says something about integer math.
71
72 RFC should not require.
73
74
75 5.24. disallow
76
77 Trivial, but unimplemented. <=== TODO.
78
79
80 5.25. extends
81
82 Support desired. <== TODO
83
84
85
Something went wrong with that request. Please try again.