Problems with JSON-LD and Content Based Addressing
bserdar@cloudprivacylabs.com
JSON-LD for Layered Schemas: The Bad
JSON-LD for Layered Schemas: The Bad
JSON-LD for Layered Schemas: The Bad
JSON-LD for Layered Schemas: The Bad
JSON-LD for Layered Schemas: The Good
{ "@id": "nodeId" }
{ "@value": "someValue" }
Content Based Addressing: Digests
Digestability
Is normalized representation really necessary?
Content Based Addressing: Docker registries
Client
Registry
sha256:12345...
Manifest.json
sha256:abcd...
sha256:def12...
Digest computed on wire data (blob), including for JSON (no normalization)
{
"id": "https://example.org/objA/schema",
"schema": "https://example.org/objABase",
"overlays": [
"https://example.org/ovl1",
"https://example.org/ovl2"
]
}
Addressing Schemas: Weak References
{
"id": "https://example/objABase"
}
{
"id": "https://example/ovl1_1"
}
https://example.org/objA/schema
{
"id": "https://example.org/objA/schema",
"schema": "https://example.org/objABase",
"overlays": [
"https://example.org/ovl1",
"https://example.org/ovl2"
]
}
{
"id": "https://example.org/objA/schema",
"schema": "https://example.org/objABase",
"overlays": [
"https://example.org/ovl1",
"https://example.org/ovl2"
]
}
{
"id": "https://example/objABase"
}
{
"id": "https://example/ovl1"
}
{
"id": "https://example/ovl2"
}
{
"id": "https://example/ovl2"
}
Addressing Schemas: Strong References
https://example.org/objA/schema
sha256:aaabbbccc...
{
"id": "https://example.org/objA/schema",
"schema": "sha256:12345...",
"overlays": [
"sha256:abcdef...",
"sha256:a1b2c3..."
]
}
{
"id": "https://example/objABase"
}
{
"id": "https://example/ovl1"
}
{
"id": "https://example/ovl2"
}
sha256:12345...
sha256:abcdef...
sha256:a1b2c3...
sha256:aaabbbccc...
Addressing Schemas: Weak References/Strong Mapping
https://example.org/objA/schema
{
"id": "https://example.org/objA/schema",
"schema": "https://example.org/objABase",
"overlays": [
"https://example.org/ovl1",
"https://example.org/ovl2"
],
"bundle": {
"https://example.org/ovl1": "sha256:1234…",
"https://example.org/ovl2": "sha256:abcdef…"
]
}