goofballLogic / ld-query

Querying JSON-LD
MIT License
20 stars 6 forks source link

Accept @vocab as part of the context #22

Closed goofballLogic closed 7 years ago

goofballLogic commented 7 years ago

If we specify @vocab as part of the json-ld context, querying for bare property names should then be interpreted as belonging to the @vocab.

e.g. if the context is

{
    "@vocab": "http://www.example.org#"
}

then a query for "name @value" should be interpreted as targetting:

{
    "http://www.example.org#name": [ { "@value": "gabrisha" } ]
}
goofballLogic commented 7 years ago

Fixed with 81be975d9286b42c56262d29e9a4e015cd7e9382