Re: JSON Schema (json-schema.org) support?

For URIs there are:

* {"@id": "uri"}  -- hopefully with additional keys
* "uri" or "compactIRI"
* List of the above when the predicate is repeated in the RDF

One issue that came up with validation was determining if a string was
a URI or not given the context rules.  The "format": "uri" rule isn't
correct, as it could be a compact IRI.  There also should be different
rules for "@type" URIs than regular resources as they should be just a
string rather than ever a resource conveyed as an object (right?)

And for values:

* "value" (or value for integers)
* {"@value": "value"} hopefully with additional keys such as language and type
* List of the above when the predicate is repeated in the RDF

So even with framing there's still quite a lot of variability,
depending on the use case and context of course.

And this isn't a criticism of JSON-LD at all, just an observation of
the challenges with JSON-Schema :)

R


On Tue, Aug 20, 2013 at 5:51 AM, Markus Lanthaler
<markus.lanthaler@gmx.net> wrote:
> On Monday, August 19, 2013 5:45 PM, Robert Sanderson wrote:
>> Dear all,
>>
>> In the IIIF and Shared Canvas we are also trying to use JSON Schema
>> for our validation of JSON-LD documents.
>>
>> The challenges in our experience are:
>> * [JSON-LD] The multitude of ways that URIs and literals can be
>> expressed.
>
> That's true however most of that variability can probably be eliminated by
> framing the data before validating it using a JSON Schema.
>
>
> --
> Markus Lanthaler
> @markuslanthaler
>
>

Received on Tuesday, 20 August 2013 22:00:26 UTC