W3C home > Mailing lists > Public > public-shex-dev@w3.org > May 2019

Re: [shape-map] RDF representation of a ShapeMap (#18)

From: Eric Prud'hommeaux via GitHub <sysbot+gh@w3.org>
Date: Mon, 13 May 2019 00:17:28 +0000
To: public-shex-dev@w3.org
Message-ID: <issue_comment.created-491641273-1557706647-sysbot+gh@w3.org>
The ShapeMap spec implies a JSON structure and then uses it in a couple examples. If that were modified to exclude the "<>"s around URLs, we could use JSON-LD pretty directly:
``` json
{
  "@context": {
    "node": { "@id": "http://www.w3.org/ns/shex#node", "@type": "@id" },
    "shape": { "@id": "http://www.w3.org/ns/shex#shape", "@type": "@id" },
    "status": "http://www.w3.org/ns/shex#status",
    "reason": "http://www.w3.org/ns/shex#reason",
    "appinfo": "http://www.w3.org/ns/shex#appinfo"
  },
  "@graph": [
    { "node": "http://data.example/node1",
      "shape": "http://schema.example/Shape2",
      "status": "conformant" },
    { "node": "http://data.example/node1",
      "shape": "http://schema.example/Shape3",
      "status": "nonconformant",
      "appinfo": {"x": "y"} }
  ]
}
```
gives:
``` turtle
PREFIX shex: <http://www.w3.org/ns/shex#>

[] shex:node <http://data.example/node1> ;
   shex:shape <http://schema.example/Shape2> ;
   shex:status "conformant" .

[] shex:appinfo _:b2 ;
  shex:node <http://data.example/node1> ;
  shex:shape <http://schema.example/Shape3> ;
  shex:status "nonconformant" .
```
I'm not sure what to do with appinfo, though. That's an arbitrary, application-specific JSON structure. I guess it would have to be just a big string.

-- 
GitHub Notification of comment by ericprud
Please view or discuss this issue at https://github.com/shexSpec/shape-map/issues/18#issuecomment-491641273 using your GitHub account
Received on Monday, 13 May 2019 00:17:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 4 June 2019 11:00:19 UTC