次の JSON があるとします。
{
"@context":
{
"name": "http://schema.org/name",
"status": "http://schema.org/status"
},
"name": "Manu Sporny",
"status": "trollin'"
}
trollin'
ステータスは URI で識別されます: http://example.com/trolling
. trollin'
上記の例のキーワードを URIに展開することはできhttp://example.com/trolling
ますか?
コンテキストの単純な操作は機能しません。
{
"@context":
{
"name": "http://schema.org/name",
"status": "http://schema.org/status",
"trollin'": "http://example.com/trolling"
},
"name": "Manu Sporny",
"status": "trollin'"
}
( JSONプレイグラウンド)
status
toのタイプを強制することも、相対 URI である@id
と想定されるため、機能しません。trollin'
{
"@context":
{
"name": "http://schema.org/name",
"status": {
"@id": "http://schema.org/status",
"@type": "@id"
},
"trollin'": "http://example.com/trolling"
},
"name": "Manu Sporny",
"status": "trollin'"
}