8000 JSON-LD as constraind by grammar is limiting · Issue #120 · shexSpec/shex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
JSON-LD as constraind by grammar is limiting #120
Open
@JervenBolleman

Description

@JervenBolleman

There are many ways to write JSON-LD documents that could express Shape Expressions. However, many of these reasonable serializations are not valid ShexJ files. e.g.

{ "@context": 
 	{ "@vocab" : "http://www.w3.org/ns/shex.jsonld", 
      "foaf" : "http://xmlns.com/foaf/0.1/" ,
      "predicate" : {"@type":"@id"}},
  "type": "Schema",
  "shapes": [
    { "@id": "http://my.example/#UserShape",
      "type": "Shape",
      "expression": {
        "type": "TripleConstraint",
        "predicate": "foaf:name",
        "valueExpr": {
          "type": "NodeConstraint",
          "datatype": "http://www.w3.org/2001/XMLSchema#string" } } }
  ] 
}

This is a small adaptation of one of the primer examples but is not a valid ShexJ file.

The example here and the JSON-LD in the primer are equivalent RDF wise.

A solution could be to add a standard JSON-LD framing to generate JSON-LD that fits into the grammar.
Other option is to use ShexR as the basis for defining ShexJ.

Why is this important, it is quite normal to generate some Shex shapes based on the output of some existing RDF dataset, and the fact that we can't directly sparql construct the shapes is unfortunate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0