Mapping predefined values to URIs when interpreting JSON as JSON-LD

I'm looking for some help/guidance with context usage.
 
Say I have an existing JSON document:
 
{
  "property1": "value1",
  "property2": "value2"
}
 
I'm struggling with mapping this to existing URIs.
Say:
property1 => http://example.com/vocab#foo
property2 => http://example.com/vocab#bar
value1 => http://example.com/vocab#baz
value2 => http://example.com/vocab#qux

So the triples I'm looking to derive are:

_:b0 <http://example.com/vocab#bar> <http://example.com/vocab#baz> .
_:b0 <http://example.com/vocab#foo> <http://example.com/vocab#qux> .

I tried with this context:

{
  "@context": {
    "property1": {
      "@id": "http://example.com/vocab#foo",
      "@type": "@id"
    },
    "property2": {
      "@id": "http://example.com/vocab#bar",
      "@type": "@id"
    },
    "value1": "http://example.com/vocab#baz",
    "value2": "http://example.com/vocab#qux"
  }
}

But this does not do the desired mappings for the values, instead the values are
just interpreted relative to the base/current URI.

It feels like I'm missing something obvious...

Cheers,
John

 

Received on Tuesday, 3 June 2014 19:53:31 UTC