Closed Houlton closed 6 years ago
Per RFC 8259, the behavior of duplicate fields is undefined.
Per the latest JSON Schema draft, objects in the JSON Schema data model cannot have multiple keys, so the behavior for a JSON document with multiple keys is undefined.
Hi, So, I can't use gojsonschema to detect multiple keys, am I right?
@Houlton you cannot use any conforming JSON Schema implementation to detect multiple keys. Multiple keys are not an interoperable feature of JSON and therefore they are not covered by the specification. All implementations should have this limitation, because the IETF JSON working group that produced RFC 8259 and its predecessors chose not to address duplicate keys in an interoperable way. JSON Schema therefore does not have any reliable way to detect or otherwise interact with them.
Got it . Thank you very much for your explanation.
This is my json content: { "name" : "tony", "name" : "jane" } There are two same fields, but Validate OK.