Properties, members, items, and elements #44
elreydetodo
started this conversation in
Vision and direction
Replies: 1 comment
-
You bring up a good point. The terminology used in JSON Schema pre-dates anyone currently working on the spec, so no one knows exactly how the discrepancy came to be. The terminology appears to come from JavaScript. I don't know why JSON chose to use different terminology than JavaScript despite being born form JavaScript. I think changing the terminology used in the spec to match the RFC makes sense, but I wouldn't change the keywords to match JSON terminology. JSON Schema is too widely used to make such drastic changes to the terminology. We're stuck with it at this point. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
RFC 8259 defines "The JavaScript Object Notation (JSON) Data Interchange Format". It is the definition of JSON.
Here's the beginning of section 4:
Here's the beginning of section 5:
The actual RFC for JSON calls the things that JSON Schema's "property" a "member", and JSON Schema's "item" an "element".
JSON Schema Core Draft 2020-12 says this in section 2:
We even purport to use the vocabulary from the RFC, then we just don't do it.
JSON Schema is definitely a lower precedence specification than JSON itself. It seems like JSON Schema should be using the terminology established by the RFC instead of inventing new terms.
Am I missing something about why we are using terminology that is not consistent with the JSON RFC? Do we have any plan to change this? How did we get to this point?
Beta Was this translation helpful? Give feedback.
All reactions