JSON schema doesn't set additionalProperties: false, therefore it is
allowed to have additional properties. It is intended to be extensible
in that sense, so you can use implementation-specific properties to
annotate with additional information, just as you suggest.
Kris
I think that foreign keys are not meaningful for (object) hierarchies:
3 major data models (relational, hierarchic, object/frames) have
impedance between each.
So I think correct way of thinking of foreign key references is to
consider it something to reduce impedance between what JSON schema is
designed to handle (object model, which is sort of hierarchy plus
identity referencing), and relational model. But not trying to define
relational model -- that should be out of scope, really.
So why support it at all? Probably because serializing relational data
is a very common use case, so it makes some sense to add "non core"
support.
-+ Tatu +-
-+ Tatu +-
Do you think that the being able to use a schema to define the mapping
of property values to URLs for RESTful serialization of relational rows,
where the relationalships are abstracted to URL hyperlinks? IMO, this
provides the appropriate separation of concerns because the client is
only aware of resources and the property values that references other
resources (hyperlinks), thus the underlying storage model isn't
necessarily exposed. At the same time, it is easy to define a schema
that would allow the underlying db data to coincide with the serialized
JSON and implied hyperlinks (by mapping keys to URLs, thus foreign keys
can be used a relative URLs with the appropriate base URL defined by the
schema.).
Kris
Yes, that sounds reasonable to me.
> that would allow the underlying db data to coincide with the serialized
> JSON and implied hyperlinks (by mapping keys to URLs, thus foreign keys
> can be used a relative URLs with the appropriate base URL defined by the
> schema.).
Yes. I think it is reasonable to expect that using
apps/frameworks/systems can do proper binding to concrete model (for
Objects, to object definitions, for DBs, schemas), from more generic
model based on URLs. And ideally, using agreed-upon conventions would
make this both flexible and non-intrusive and convenient to
use/implement.
-+ Tatu +-