Clarification on blank node idioms

After not having looked at the spec for months, I'm in the process of
manually converting a bit of Turtle into JSON-LD. I stumbled at this
point:

<http://hyperdata.org/Hello>
 foaf:maker [ foaf:nick "danja" ] .

Text-searching the spec ("blank nodes") I found:

http://json-ld.org/spec/latest/json-ld-syntax/#identifying-unlabeled-nodes

...which didn't seem to help at all. How would the above be expressed
using the "_:blank" style?

Anyhow I looked at the examples in the Playground, the Place one gave
me the shape I was after (from geo -> latitude etc) :

{
 "@context": {
  "maker": "http://xmlns.com/foaf/0.1/maker",
  "nick": "http://xmlns.com/foaf/0.1/nick"
  },
 "@id": "http://hyperdata.org/Hello",
 "maker": {
               "nick": "danja"
  }
}

I assume this idiom is explained elsewhere (but couldn't see it on a
skim). Whatever, I'd suggest referring to it and/or providing an
example somewhere near the unlabeled nodes section for the benefit of
folks approaching the doc with Turtle-tinted spectacles.

One thing I'm still uncertain about is that although the JSON-LD above
produced the triples I was after, the context part doesn't distinguish
what kind of a node the object of maker/subject of nick was. This
appears to be possible using the context:

 "@context": {
  "maker": {
        "@id": "http://xmlns.com/foaf/0.1/maker",
        "@type": "@id"
     },

- but doesn't make any difference to the resulting triples.

I checked with the Person example which includes:

    "homepage": {
      "@id": "http://xmlns.com/foaf/0.1/homepage",
      "@type": "@id"
    }

and it produces the same triples with simply:

"homepage": "http://xmlns.com/foaf/0.1/homepage"

Leading to the question: why would/should anyone bother putting node
type info into the context?

Cheers,
Danny.

-- 
http://dannyayers.com

http://webbeep.it  - text to tones and back again

Received on Monday, 2 April 2012 08:46:58 UTC