JSON-LD @context¶
Various examples the @context
property can take.
See here for the
W3C specification, and here
for what ActivityStreams says about it.
Examples¶
Example 1¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://pyfedi.local/c/pie",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/BLgCHsxH_LY",
"published": "2025-09-14T08:51:38Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://pyfedi.local/c/pie"
],
"id": "http://pasture-one-actor/object/_wxyW-ppBX4",
"published": "2025-09-14T08:51:38Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "@context url as the ActivityStreams URL",
"tag": [
{
"type": "Mention",
"href": "http://pyfedi.local/c/pie"
}
]
}
}
pyfedi
{
"id": 18,
"user_id": 2,
"community_id": 1,
"title": "@context url as the ActivityStreams URL",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-14T08:51:39.101217Z",
"ap_id": "http://pasture-one-actor/object/_wxyW-ppBX4",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "@context url as the ActivityStreams URL"
}
Example 2¶
activity
{
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://pyfedi.local/c/pie",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/L0QzdUL9txs",
"published": "2025-09-14T08:51:39Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://pyfedi.local/c/pie"
],
"id": "http://pasture-one-actor/object/mThRMY6HgAU",
"published": "2025-09-14T08:51:39Z",
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"content": "@context url is list of ActivityStreams URL",
"tag": [
{
"type": "Mention",
"href": "http://pyfedi.local/c/pie"
}
]
}
}
pyfedi
{
"id": 19,
"user_id": 2,
"community_id": 1,
"title": "@context url is list of ActivityStreams URL",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-14T08:51:39.806749Z",
"ap_id": "http://pasture-one-actor/object/mThRMY6HgAU",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "@context url is list of ActivityStreams URL"
}
Example 3¶
activity
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
],
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://pyfedi.local/c/pie",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/v9Bw2yl3mFc",
"published": "2025-09-14T08:51:40Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://pyfedi.local/c/pie"
],
"id": "http://pasture-one-actor/object/GDpwgddKQ84",
"published": "2025-09-14T08:51:40Z",
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
],
"content": "@context url is list of ActivityStreams URL and Hashtag",
"tag": [
{
"type": "Mention",
"href": "http://pyfedi.local/c/pie"
}
]
}
}
pyfedi
{
"id": 20,
"user_id": 2,
"community_id": 1,
"title": "@context url is list of ActivityStreams URL and Hashtag",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-14T08:51:40.601145Z",
"ap_id": "http://pasture-one-actor/object/GDpwgddKQ84",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "@context url is list of ActivityStreams URL and Hashtag"
}
Example 4¶
activity
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/5711"
],
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://pyfedi.local/c/pie",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/6Rx3EF-Qtqo",
"published": "2025-09-14T08:51:41Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://pyfedi.local/c/pie"
],
"id": "http://pasture-one-actor/object/NRFLZnPj5VI",
"published": "2025-09-14T08:51:41Z",
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/5711"
],
"content": "@context with ActivityStreams URL + w3id-fep document",
"tag": [
{
"type": "Mention",
"href": "http://pyfedi.local/c/pie"
}
]
}
}
pyfedi
{
"id": 21,
"user_id": 2,
"community_id": 1,
"title": "@context with ActivityStreams URL + w3id-fep document",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-14T08:51:41.365424Z",
"ap_id": "http://pasture-one-actor/object/NRFLZnPj5VI",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "@context with ActivityStreams URL + w3id-fep document"
}
Example 5¶
activity
{
"@context": null,
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://pyfedi.local/c/pie",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/eyssvdoW-10",
"published": "2025-09-14T08:51:41Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://pyfedi.local/c/pie"
],
"id": "http://pasture-one-actor/object/WXU5alAQQgg",
"published": "2025-09-14T08:51:41Z",
"@context": null,
"content": "no @context",
"tag": [
{
"type": "Mention",
"href": "http://pyfedi.local/c/pie"
}
]
}
}
pyfedi
{
"id": 22,
"user_id": 2,
"community_id": 1,
"title": "[Microblog] no @context",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-14T08:51:42.140907Z",
"ap_id": "http://pasture-one-actor/object/WXU5alAQQgg",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "no @context"
}
Example 6¶
activity
{
"@context": "http://strange.example/context",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://pyfedi.local/c/pie",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/fXFy_NnxSyc",
"published": "2025-09-14T08:51:42Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://pyfedi.local/c/pie"
],
"id": "http://pasture-one-actor/object/41vLUYCudPA",
"published": "2025-09-14T08:51:42Z",
"@context": "http://strange.example/context",
"content": "@context is a broken url",
"tag": [
{
"type": "Mention",
"href": "http://pyfedi.local/c/pie"
}
]
}
}
pyfedi
{
"id": 23,
"user_id": 2,
"community_id": 1,
"title": "@context is a broken url",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-14T08:51:42.862732Z",
"ap_id": "http://pasture-one-actor/object/41vLUYCudPA",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "@context is a broken url"
}