To solve the semantic element, we introduced the notion of a namespaced identifier (NSID) which is simply a form of reverse-DNS.
We chose reverse-DNS to strongly indicate that a data type was being identified and not a resource.3 (View Highlight)
We wanted it to translate cleanly into static type systems for generated code, and we wanted runtime validation to be reliable enough that applications would not break due to bad data. (View Highlight)
Lastly, we wanted to address evolvability of the data as it relates to forwards/backwards compatibility as well as the introduction of new behaviors from outside of the original schema authors. (View Highlight)
When data is transmitted, it uses the $type
field to identify its schema. This resolves the union to one of the specified types. (View Highlight)