w3c / json-ld-api

JSON-LD 1.1 Processing Algorithms and API Specification
https://w3c.github.io/json-ld-api/
Other
73 stars 29 forks source link

Compaction test #t0108 contains duplicate keys in manifest and probably shouldn't #571

Closed dclements closed 11 months ago

dclements commented 11 months ago

Location: https://github.com/w3c/json-ld-api/blob/main/tests/compact-manifest.jsonld#L908

What is there:

{
      "@id": "#t0108",
      "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
      "name": "Relative propererty IRIs with @vocab: ''",
      "purpose": "Complex use cases for relative IRI compaction or properties",
      "name": "context with JavaScript Object property names",
      "purpose": "Compact with context including JavaScript Object property names",
      "input": "compact/0108-in.jsonld",
      "context": "compact/0108-context.jsonld",
      "expect": "compact/0108-out.jsonld"
    },

Note the duplication of keys for purpose and name. Name looks like it should probably be "Relative property IRIs with @vocab: '' context for JavaScript Object property names" but purpose may not merge quite so easily.

The JSON RFC says: "The names within an object SHOULD be unique" and the JSON-LD spec says "In JSON-LD the names in an object must be unique," so it would seem this is an error in the manifest.

gkellogg commented 11 months ago

Yes, that's redundant information, and seems to be the result of a merge error. The later versions of these properties is what show up in the HTML version, and seem to be correct.

Looking at the inputs and outputs, they don't seem to have anything to do with Relative property IRis or @vocab (sic propererty) and do use property names compatible with JavaScript.