- From: Robert Sanderson <azaroth42@gmail.com>
- Date: Tue, 17 Mar 2020 10:41:57 -0700
- To: James Hudson <jameshudson3010@gmail.com>
- Cc: Linked JSON <public-linked-json@w3.org>
Received on Tuesday, 17 March 2020 17:42:48 UTC
We have been reasonably successful in using json-schema for syntax level validation like that. https://json-schema.org/ 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: https://github.com/web-platform-tests/wpt/tree/master/annotation-model For the semantic layer, there's SHACL and SHEX, plus of course RDFS and OWL. See: https://shex.io/ for resources there, including the JSON projection. Hope that helps! Rob On Tue, Mar 17, 2020 at 10:33 AM James Hudson <jameshudson3010@gmail.com> wrote: > As I am creating the json-ld classes and properties ( following the model > of schema.org ), 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