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/UGEyd02yHvo",
"published": "2025-10-12T08:53:00Z",
"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/7p872lGB8s0",
"published": "2025-10-12T08:53:00Z",
"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/5cmoOYBnp0o",
"published": "2025-10-12T08:53:00Z",
"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/5tRvqWnzxYc",
"published": "2025-10-12T08:53:00Z",
"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/m8a__dMboFE",
"published": "2025-10-12T08:53:00Z",
"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/Ghluyzht3Z4",
"published": "2025-10-12T08:53:00Z",
"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/UeYlZXAaPWY",
"object": {
"@context": "https://www.w3.org/ns/activitystreams",
"attributedTo": "http://actor.example",
"content": "@context url as the ActivityStreams URL",
"id": "http://actor.example/object/-MxbSh4rv4s",
"published": "2025-10-12T08:53:00Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-10-12T08:53:00Z",
"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/DHYzd9OF0rQ",
"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/37bf7kZmB98",
"published": "2025-10-12T08:53:00Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-10-12T08:53:00Z",
"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/FUVC1hS1gRA",
"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/V4TgtUiP1Bc",
"published": "2025-10-12T08:53:00Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-10-12T08:53:00Z",
"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/3dXV9tSk8q4",
"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/qVSL3zzQuMI",
"published": "2025-10-12T08:53:00Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-10-12T08:53:00Z",
"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/2WanuID9aEo",
"object": {
"@context": null,
"attributedTo": "http://actor.example",
"content": "no @context",
"id": "http://actor.example/object/TcJSoll2h7s",
"published": "2025-10-12T08:53:00Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-10-12T08:53:00Z",
"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/GByBkPqVg9E",
"object": {
"@context": "http://strange.example/context",
"attributedTo": "http://actor.example",
"content": "@context is a broken url",
"id": "http://actor.example/object/guwiQmhbEU8",
"published": "2025-10-12T08:53:00Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-10-12T08:53:00Z",
"to": [
"http://remote.example/",
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Create"
}