--Gary
--Gary
I think this is what you are asking for:
instance.json:
{
"$schema" : "schema.json"
}
schema.json:
{
"links" : [
{
"rel" : "describedby",
"href" : "{$schema}"
}
]
}
Yes, that is correct. JSON values have no meaning until a schema is
applied to it. So when you apply this schema against the instance, you
then understand that "$schema" is a reference to the schema that
should be validating the instance. Except a parser/interpreter already
knows this, so it's just there for semantics.
--Gary
The meaning of any property (like "$schema" and "$ref") are based from
the schema that gives those properties meaning.
--Gary
--
You received this message because you are subscribed to the Google Groups "JSON Schema" group.
To post to this group, send email to json-...@googlegroups.com.
To unsubscribe from this group, send email to json-schema...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/json-schema?hl=en.
JSON is not like XML. JSON does not have a defined way of declaring a schema that it (should) adhere to, and JSON-schema does not require any additional conventions be added to an instance, so you can put anything you want in your JSON-instance, but there is no standard way of declaring a schema in your instance. True?
--