Hashtags and JSON-LD¶
The examples here are various variations of creating the Hashtag element in the tag list. These variations can be useful in understanding how strict an application sees JSON-LD.
Hashtags are a good illustration of JSON-LD parsing as Hashtag is not part of the ActivityStreams vocabulary.
All examples except the first are questionable, and probably should not
be used when publishing to the Fediverse. The examples marked with
⚠️ are expected to fail with a JSON-LD parser. The examples using
as:Hashtag are expected to fail with a JSON only parser.
Examples¶
Example 1¶
activity
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive"
}
],
"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/Swm33-u7ybc",
"published": "2025-11-08T13:28:16Z",
"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/poorH5L-80Q",
"published": "2025-11-08T13:28:16Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
mastodon
{
"id": "115514310460369126",
"created_at": "2025-11-08T13:28:16.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/poorH5L-80Q",
"url": "http://pasture-one-actor/object/poorH5L-80Q",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "text",
"filtered": [],
"reblog": null,
"account": {
"id": "115514309622755922",
"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-08T00: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": 14,
"last_status_at": "2025-11-08",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [
{
"name": "test",
"url": "http://mastodon/tags/test"
}
],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
Example 2¶
activity
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive"
}
],
"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/UXcBKb7ufbs",
"published": "2025-11-08T13:28:17Z",
"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/UYPG6p-NdvU",
"published": "2025-11-08T13:28:17Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
mastodon
{
"id": "115514310519175200",
"created_at": "2025-11-08T13:28:17.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/UYPG6p-NdvU",
"url": "http://pasture-one-actor/object/UYPG6p-NdvU",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "using as:Hashtag",
"filtered": [],
"reblog": null,
"account": {
"id": "115514309622755922",
"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-08T00: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": 15,
"last_status_at": "2025-11-08",
"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",
"sensitive": "as:sensitive"
}
],
"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/sitokgvJADs",
"published": "2025-11-08T13:28:18Z",
"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/eJZG0-gXRAQ",
"published": "2025-11-08T13:28:18Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
mastodon
{
"id": "115514310578927372",
"created_at": "2025-11-08T13:28:18.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/eJZG0-gXRAQ",
"url": "http://pasture-one-actor/object/eJZG0-gXRAQ",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "no type \u26a0\ufe0f ",
"filtered": [],
"reblog": null,
"account": {
"id": "115514309622755922",
"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-08T00: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": 16,
"last_status_at": "2025-11-08",
"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",
"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/w-_B811uH1E",
"published": "2025-11-08T13:28:19Z",
"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/L3JJap_Wm1A",
"published": "2025-11-08T13:28:19Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
mastodon
{
"id": "115514310636425342",
"created_at": "2025-11-08T13:28:19.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/L3JJap_Wm1A",
"url": "http://pasture-one-actor/object/L3JJap_Wm1A",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "Hashtag not in @context \u26a0\ufe0f ",
"filtered": [],
"reblog": null,
"account": {
"id": "115514309622755922",
"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-08T00: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": 17,
"last_status_at": "2025-11-08",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [
{
"name": "test",
"url": "http://mastodon/tags/test"
}
],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
Example 5¶
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/2Xi5YFb2Ucs",
"published": "2025-11-08T13:28:20Z",
"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/qD34CA63IlM",
"published": "2025-11-08T13:28:20Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
mastodon
{
"id": "115514310701026762",
"created_at": "2025-11-08T13:28:20.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/qD34CA63IlM",
"url": "http://pasture-one-actor/object/qD34CA63IlM",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "Hashtag not in @context; as:Hashtag",
"filtered": [],
"reblog": null,
"account": {
"id": "115514309622755922",
"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-08T00: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": 18,
"last_status_at": "2025-11-08",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}