JSON-LD @context¶
Various examples the @context property can take.
See here for the
W3C specification, and here
for what ActivityStreams says about it.
Support Table Preview¶
| @context | Object | Activity |
|---|---|---|
“https://www.w3.org/ns/activitystreams” |
Object | Activity |
[ “https://www.w3.org/ns/activitystreams” ] |
Object | Activity |
[ “https://www.w3.org/ns/activitystreams”, {“Hashtag”: “as:Hashtag” } ] |
Object | Activity |
[ “https://www.w3.org/ns/activitystreams”, “https://w3id.org/fep/5711” ] |
Object | Activity |
null |
Object | Activity |
“http://strange.example/context” |
Object | Activity |
Objects¶
Object 1¶
{
"@context": "https://www.w3.org/ns/activitystreams",
"attributedTo": "http://actor.example",
"content": "@context url as the ActivityStreams URL",
"id": "http://actor.example/object/bY6J4rnyNAQ",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 2¶
{
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"attributedTo": "http://actor.example",
"content": "@context url is list of ActivityStreams URL",
"id": "http://actor.example/object/KiYlsd9yxjY",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 3¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
],
"attributedTo": "http://actor.example",
"content": "@context url is list of ActivityStreams URL and Hashtag",
"id": "http://actor.example/object/VTr2XtmugSU",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 4¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/5711"
],
"attributedTo": "http://actor.example",
"content": "@context with ActivityStreams URL + w3id-fep document",
"id": "http://actor.example/object/vpZZ570eNUM",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 5¶
{
"@context": null,
"attributedTo": "http://actor.example",
"content": "no @context",
"id": "http://actor.example/object/Sb-CoTY9P_c",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 6¶
{
"@context": "http://strange.example/context",
"attributedTo": "http://actor.example",
"content": "@context is a broken url",
"id": "http://actor.example/object/1p0D7PqODtI",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Activities¶
Activity 1¶
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "http://actor.example",
"id": "http://actor.example/activity/4PHGf6ur7N0",
"object": {
"@context": "https://www.w3.org/ns/activitystreams",
"attributedTo": "http://actor.example",
"content": "@context url as the ActivityStreams URL",
"id": "http://actor.example/object/mKWqOu3stsI",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-11-21T12:05:03Z",
"to": [
"http://remote.example/",
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Create"
}
Activity 2¶
{
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"actor": "http://actor.example",
"id": "http://actor.example/activity/lpKTfJbHxu4",
"object": {
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"attributedTo": "http://actor.example",
"content": "@context url is list of ActivityStreams URL",
"id": "http://actor.example/object/FI4zrkBLSIg",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-11-21T12:05:03Z",
"to": [
"http://remote.example/",
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Create"
}
Activity 3¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
],
"actor": "http://actor.example",
"id": "http://actor.example/activity/9aUBcZhsoEk",
"object": {
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
],
"attributedTo": "http://actor.example",
"content": "@context url is list of ActivityStreams URL and Hashtag",
"id": "http://actor.example/object/4X02xVRYYBs",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-11-21T12:05:03Z",
"to": [
"http://remote.example/",
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Create"
}
Activity 4¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/5711"
],
"actor": "http://actor.example",
"id": "http://actor.example/activity/rKbw8Vt5vOc",
"object": {
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/5711"
],
"attributedTo": "http://actor.example",
"content": "@context with ActivityStreams URL + w3id-fep document",
"id": "http://actor.example/object/lbj6MmVVKcw",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-11-21T12:05:03Z",
"to": [
"http://remote.example/",
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Create"
}
Activity 5¶
{
"@context": null,
"actor": "http://actor.example",
"id": "http://actor.example/activity/Pev6U5j8JxQ",
"object": {
"@context": null,
"attributedTo": "http://actor.example",
"content": "no @context",
"id": "http://actor.example/object/zcJj3wcVL5w",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-11-21T12:05:03Z",
"to": [
"http://remote.example/",
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Create"
}
Activity 6¶
{
"@context": "http://strange.example/context",
"actor": "http://actor.example",
"id": "http://actor.example/activity/-r57pvcurKk",
"object": {
"@context": "http://strange.example/context",
"attributedTo": "http://actor.example",
"content": "@context is a broken url",
"id": "http://actor.example/object/9aguXy2Gvqg",
"published": "2025-11-21T12:05:03Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-11-21T12:05:03Z",
"to": [
"http://remote.example/",
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Create"
}