Skip to content

Commit e86e5cf

Browse files
committed
Clarify data model vs unicode characters
JSON Schema does not care about unicode characters, only the data model. Vocabularies SHOULD account for this by working with data model strings instead of the original unicode representation of numbers. For example, define a value for the "format" validation keyword that indicates that a string should be interpreted as a fixed-point decimal if you wish to retain precision information in your data.
1 parent 924f7b3 commit e86e5cf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

jsonschema-core.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,13 @@
188188
</list>
189189
</t>
190190
<t>
191-
Whitespace and formatting concerns are thus outside the scope of JSON Schema.
191+
Whitespace and formatting concerns, including different lexical
192+
representations of numbers that are equal within the data model, are thus
193+
outside the scope of JSON Schema. JSON Schema vocabularies that wish
194+
to work with such differences in lexical representations SHOULD define
195+
keywords to precisely interpret formatted strings within the data model
196+
rather than relying on having the original JSON representation Unicode
197+
characters available.
192198
</t>
193199
<t>
194200
Since an object cannot have two properties with the same key, behavior for a

0 commit comments

Comments
 (0)