Re: Validating json-ld

We have been reasonably successful in using json-schema for syntax level
validation like that.

That can catch typos, incorrect structures and so on. But it is much harder
to catch semantic level errors if, for example if the model allows any
subclass of Actor to carry out an Activity, and someone defines Software as
a type of Actor, then your syntax layer might reject it as the string
"Software" is not the same string as "Actor".

An example of the JSON-Schema approach was the conformance testing of the
Web Annotation specs:

For the semantic layer, there's SHACL and SHEX, plus of course RDFS and
See: for resources there, including the JSON projection.

Hope that helps!


On Tue, Mar 17, 2020 at 10:33 AM James Hudson <>

> As I am creating the json-ld classes and properties ( following the model
> of ), I am faced with the need to validate it to detect typos
> (@ID instead of @id, etc.).
> What strategies do you employ to make sure that the json-ld being typed
> into a text editor is valid?

Rob Sanderson
Semantic Architect
The Getty Trust
Los Angeles, CA 90049

Received on Tuesday, 17 March 2020 17:42:48 UTC