From e86e5cfa8fb930f6ecd3b340dd6ccc79bea93a70 Mon Sep 17 00:00:00 2001 From: Henry Andrews Date: Wed, 25 Oct 2017 11:14:54 -0700 Subject: [PATCH] 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. --- jsonschema-core.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jsonschema-core.xml b/jsonschema-core.xml index c42d9b34..798745c3 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -188,7 +188,13 @@ - Whitespace and formatting concerns are thus outside the scope of JSON Schema. + Whitespace and formatting concerns, including different lexical + representations of numbers that are equal within the data model, are thus + outside the scope of JSON Schema. JSON Schema vocabularies that wish + to work with such differences in lexical representations SHOULD define + keywords to precisely interpret formatted strings within the data model + rather than relying on having the original JSON representation Unicode + characters available. Since an object cannot have two properties with the same key, behavior for a