Query-Solid icon indicating copy to clipboard operation
Query-Solid copied to clipboard

Get a property starting by '@' raises an error

Open matthieu-fesselier opened this issue 5 years ago • 2 comments

If I try to get a property starting by @, like the JSONLD keywords, I get an error:

  await solid.data.context.extend(base_context)
  const type = solid.data["https://api.coopstarter.happy-dev.fr/resources/1/"]['@type']
  console.log(`${await type}`)

  // Uncaught (in promise) Error
  // expandProperty @ | JSONLDResolver.js:65

It works if I remove the @ before type. But in this case, I expect the http://happy-dev.fr/owl/#type property and not the rdf:type

matthieu-fesselier avatar Sep 26 '19 07:09 matthieu-fesselier

@rubensworks Is this a JSONLDResolver matter?

RubenVerborgh avatar Sep 26 '19 10:09 RubenVerborgh

Expansion of keywords (like @type) is not standardized in the JSON-LD spec. So this is not a bug, just not a feature (yet) :-) It's something that should be implemented in the expansion logic in jsonld-context-parser.js.

rubensworks avatar Sep 26 '19 10:09 rubensworks