json-ld 標準の例の一部をここにコピーします。
{
"@context": {
"foaf": "http://xmlns.com/foaf/0.1/",
"picture": { "@id": "foaf:depiction", "@type": "@id" }
},
"picture": "http://twitter.com/account/profile_image/markuslanthaler"
}
なぜ で を使用する必要があるのか、わかりませ@id
ん@context
。そのはず:
{
"@context": {
"foaf": "http://xmlns.com/foaf/0.1/",
"picture": {
"@type": [ "@id", "foaf:depiction" ]
}
},
"picture": "http://twitter.com/account/profile_image/markuslanthaler"
}
説明はありますか?
何年か後
アッパーは、より再利用可能な形式で次のことを意味すると思います。
{
"http://xmlns.com/foaf/0.1/depiction": "http://twitter.com/account/profile_image/markuslanthaler"
}
平らになった形を確認してから、徐々に圧縮していく方がずっと分かりやすいです。つまり、@id
はプロパティの IRI であり、@type
は値の型です。これは here@id
であり、混乱する可能性がありますが、IRI を値として期待していることを意味しています。