Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get a property starting by '@' raises an error #41

Open
matthieu-fesselier opened this issue Sep 26, 2019 · 2 comments
Open

Get a property starting by '@' raises an error #41

matthieu-fesselier opened this issue Sep 26, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@matthieu-fesselier
Copy link

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

@RubenVerborgh
Copy link
Member

@rubensworks Is this a JSONLDResolver matter?

@rubensworks
Copy link
Contributor

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.

@RubenVerborgh RubenVerborgh added the enhancement New feature or request label Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants