- From: Holger Knublauch <holger@topquadrant.com>
- Date: Tue, 7 Feb 2017 16:27:26 +1000
- To: "public-data-shapes-wg@w3.org" <public-data-shapes-wg@w3.org>
I was asked via a private email whether we could provide some example of 
how SHACL could look in JSON-LD. So I have added the following snippet 
to the SHACL Example in section 1.4. I have tested that it can be 
parsed, assuming a suitable @context exists.
Does anyone see problems with this addition?
Thanks
Holger
{
     "@id" : "ex:PersonShape",
     "@type" : "NodeShape",
     "targetClass" : "ex:Person",
     "property" : [
         {
             "path" : "ex:ssn",
             "maxCount" : 1,
             "datatype" : "xsd:string" ,
             "pattern" : "^\\d{3}-\\d{2}-\\d{4}$"
         },
         {
             "path" : "ex:child",
             "class" : "ex:Person",
             "nodeKind" : "sh:IRI"
         },
         {
             "comment" : "A person's parents are represented via 
ex:child used in the inverse direction." ,
             "path" : { "inversePath" : "ex:child" },
             "name" : "parent",
             "maxCount" : 2
         }
     ],
     "closed" : true,
     "ignoredProperties" : [ "rdf:type" ]
}
Received on Tuesday, 7 February 2017 06:28:08 UTC