JSON-LD 圧縮と、それを使用して値の IRI を圧縮できるかどうかについて、少し混乱しています。
次の JSON-LD オブジェクトがあります
{
"@context": {
"@base": "file:///",
"x": "https://example.org/pub/x#",
"x-attribute": "https://example.org/pub/x-attribute#",
"x:purpose": {
"@type": "@id"
}
},
"https://example.org/pub/x#purpose": "https://example.org/pub/x-attribute#on"
}
および次の新しいコンテキスト
{
"x": "https://example.org/pub/x#",
"x-attribute": "https://example.org/pub/x-attribute#"
}
私は期待している...そして欲しい...を手に入れたい
{
"@context": {
"x": "https://example.org/pub/x#",
"x-attribute": "https://example.org/pub/x-attribute#"
},
"x:purpose": "x-attribute:on"
}
しかし、私が最終的に得るのは
{
"@context": {
"x": "https://example.org/pub/x#",
"x-attribute": "https://example.org/pub/x-attribute#"
},
"x:purpose": "https://example.org/pub/x-attribute#on"
}
これを試してみたい場合は、これをJSON-LD Playgroundにプラグインできます。
自分がやろうとしていることをどのように達成できますか? つまり、基本的に値の位置でコンパクト IRI を使用します。