json-ld / json-ld.org

JSON for Linked Data's documentation and playground site
https://json-ld.org/
Other
859 stars 152 forks source link

error in frame-p010-out.jsonld #676

Closed eroux closed 6 years ago

eroux commented 6 years ago

The #tp010 test of frames specifies in the manifest:

{
      "@id": "#tp010",
      "@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
      "name": "property CURIE conflict (prune bnodes)",
      "purpose": "(Not really framing) A term looking like a CURIE becomes a CURIE when framing/compacting if defined as such in frame/context.",
      "input": "frame-0010-in.jsonld",
      "frame": "frame-0010-frame.jsonld",
      "expect": "frame-p010-out.jsonld",
      "option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
    }

(note the json-ld-1.1 processing mode) but expects the following output:

{
  "@context": {
    "dc": "http://purl.org/dc/terms/",
    "dc:creator": {
      "@type": "@id"
    },
    "foaf": "http://xmlns.com/foaf/0.1/",
    "ps": "http://purl.org/payswarm#"
  },
  "@graph": [{
    "@id": "http://example.com/asset",
    "@type": "ps:Asset",
    "dc:creator": {
      "foaf:name": "John Doe"
    }
  }]
}

which I believe is wrong due to the omit graph flag being set when the processing mode is 1.1, and should instead be:

result: {
  "@context" : {
    "dc" : "http://purl.org/dc/terms/",
    "dc:creator" : {
      "@type" : "@id"
    },
    "foaf" : "http://xmlns.com/foaf/0.1/",
    "ps" : "http://purl.org/payswarm#"
  },
  "@id" : "http://example.com/asset",
  "@type" : "ps:Asset",
  "dc:creator" : {
    "foaf:name" : "John Doe"
  }
}

or am I missing something? The same problem appears in (at least) #tp046 and #tp050.

gkellogg commented 6 years ago

Yes, I think you're correct, although this will now go against https://github.com/w3c/json-ld-framing.

gkellogg commented 6 years ago

Closed in favor of w3c/json-ld-framing#10.