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://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/Xx_96mcXEIw",
"published": "2025-11-21T13:24:38Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/7Y5WW1T_9M8",
"published": "2025-11-21T13:24:38Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "@context url as the ActivityStreams URL"
}
}
mastodon
{
"id": "115587906177151443",
"created_at": "2025-11-21T13:24:38.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/7Y5WW1T_9M8",
"url": "http://pasture-one-actor/object/7Y5WW1T_9M8",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "@context url as the ActivityStreams URL",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 27,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
Example 2¶
activity
{
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/Zol52I2t-Ms",
"published": "2025-11-21T13:24:39Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/taf_YaI2BLo",
"published": "2025-11-21T13:24:39Z",
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"content": "@context url is list of ActivityStreams URL"
}
}
mastodon
{
"id": "115587906235200922",
"created_at": "2025-11-21T13:24:39.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/taf_YaI2BLo",
"url": "http://pasture-one-actor/object/taf_YaI2BLo",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "@context url is list of ActivityStreams URL",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 28,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
Example 3¶
activity
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
],
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/IOimMfWRXjk",
"published": "2025-11-21T13:24:40Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/QVN4JBqLf2U",
"published": "2025-11-21T13:24:40Z",
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag"
}
],
"content": "@context url is list of ActivityStreams URL and Hashtag"
}
}
mastodon
{
"id": "115587906294054107",
"created_at": "2025-11-21T13:24:40.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/QVN4JBqLf2U",
"url": "http://pasture-one-actor/object/QVN4JBqLf2U",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "@context url is list of ActivityStreams URL and Hashtag",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 29,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
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://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/ihfQXctafj0",
"published": "2025-11-21T13:24:41Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/7SJz9nzs23g",
"published": "2025-11-21T13:24:41Z",
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/5711"
],
"content": "@context with ActivityStreams URL + w3id-fep document"
}
}
mastodon
{
"id": "115587906352650515",
"created_at": "2025-11-21T13:24:41.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/7SJz9nzs23g",
"url": "http://pasture-one-actor/object/7SJz9nzs23g",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "@context with ActivityStreams URL + w3id-fep document",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 30,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
Example 5¶
activity
{
"@context": null,
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/oY1Vgubz5ek",
"published": "2025-11-21T13:24:41Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/k7WH-dhttUg",
"published": "2025-11-21T13:24:41Z",
"@context": null,
"content": "no @context"
}
}
no result
Example 6¶
activity
{
"@context": "http://strange.example/context",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/qhwK-62-tL4",
"published": "2025-11-21T13:24:56Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/upfkZHOdoAU",
"published": "2025-11-21T13:24:56Z",
"@context": "http://strange.example/context",
"content": "@context is a broken url"
}
}
no result