Query-Solid
Query-Solid copied to clipboard
Get a property starting by '@' raises an error
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
@rubensworks Is this a JSONLDResolver
matter?
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.