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": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/activity/8DUA6TRkb1M",
"published": "2025-09-01T08:06:57Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/object/p2opEL7q6b8",
"published": "2025-09-01T08:06:57Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "01990450-a9f2-98f4-2c0f-c91a09975804",
"uri": "http://pasture-one-actor/object/p2opEL7q6b8",
"url": "http://pasture-one-actor/object/p2opEL7q6b8",
"created_at": "2025-09-01T08:06:57.000Z",
"edited_at": null,
"account": {
"id": "01990450-5ca7-f3d8-1d28-81e0b9e59c81",
"username": "actor",
"acct": "actor@pasture-one-actor",
"actor_id": "http://pasture-one-actor/actor",
"url": "http://pasture-one-actor/actor",
"display_name": "Test Actor",
"created_at": "2025-09-01T08:06:39.527Z",
"note": "",
"avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
"header": "http://mitra/api/v1/accounts/identicon",
"locked": false,
"mention_policy": "none",
"bot": false,
"identity_proofs": [],
"payment_options": [],
"fields": [],
"emojis": [],
"followers_count": 0,
"following_count": 0,
"subscribers_count": 0,
"statuses_count": 14,
"source": null,
"role": null,
"authentication_methods": null,
"client_config": null
},
"content": "text",
"language": null,
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"visibility": "public",
"sensitive": false,
"spoiler_text": "",
"pinned": false,
"replies_count": 0,
"favourites_count": 0,
"reblogs_count": 0,
"poll": null,
"media_attachments": [],
"quote": null,
"mentions": [
{
"id": "0199044f-210f-d32c-985b-a33d9bffac0c",
"username": "admin",
"acct": "admin",
"url": "http://mitra/users/admin"
}
],
"tags": [
{
"name": "test",
"url": "http://mitra/collections/tags/test"
}
],
"emojis": [],
"favourited": false,
"reblogged": false,
"bookmarked": false,
"pleroma": {
"emoji_reactions": [],
"in_reply_to_account_acct": null,
"parent_visible": true,
"quote": null,
"quote_visible": true
},
"hidden": false,
"ipfs_cid": null,
"links": []
}
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": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/activity/cZSAWep-XbY",
"published": "2025-09-01T08:06:59Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/object/x0b0MMy3NFg",
"published": "2025-09-01T08:06:59Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "01990450-afcb-b9fb-5aa4-800b0e8df96d",
"uri": "http://pasture-one-actor/object/x0b0MMy3NFg",
"url": "http://pasture-one-actor/object/x0b0MMy3NFg",
"created_at": "2025-09-01T08:06:59.000Z",
"edited_at": null,
"account": {
"id": "01990450-5ca7-f3d8-1d28-81e0b9e59c81",
"username": "actor",
"acct": "actor@pasture-one-actor",
"actor_id": "http://pasture-one-actor/actor",
"url": "http://pasture-one-actor/actor",
"display_name": "Test Actor",
"created_at": "2025-09-01T08:06:39.527Z",
"note": "",
"avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
"header": "http://mitra/api/v1/accounts/identicon",
"locked": false,
"mention_policy": "none",
"bot": false,
"identity_proofs": [],
"payment_options": [],
"fields": [],
"emojis": [],
"followers_count": 0,
"following_count": 0,
"subscribers_count": 0,
"statuses_count": 15,
"source": null,
"role": null,
"authentication_methods": null,
"client_config": null
},
"content": "using as:Hashtag",
"language": null,
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"visibility": "public",
"sensitive": false,
"spoiler_text": "",
"pinned": false,
"replies_count": 0,
"favourites_count": 0,
"reblogs_count": 0,
"poll": null,
"media_attachments": [],
"quote": null,
"mentions": [
{
"id": "0199044f-210f-d32c-985b-a33d9bffac0c",
"username": "admin",
"acct": "admin",
"url": "http://mitra/users/admin"
}
],
"tags": [],
"emojis": [],
"favourited": false,
"reblogged": false,
"bookmarked": false,
"pleroma": {
"emoji_reactions": [],
"in_reply_to_account_acct": null,
"parent_visible": true,
"quote": null,
"quote_visible": true
},
"hidden": false,
"ipfs_cid": null,
"links": []
}
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": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/activity/wQSO_v8agFA",
"published": "2025-09-01T08:07:01Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/object/RK-mL7EhqQo",
"published": "2025-09-01T08:07:01Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
mitra
{
"id": "01990450-b5a4-299d-5bb6-f433330bd248",
"uri": "http://pasture-one-actor/object/RK-mL7EhqQo",
"url": "http://pasture-one-actor/object/RK-mL7EhqQo",
"created_at": "2025-09-01T08:07:01.000Z",
"edited_at": null,
"account": {
"id": "01990450-5ca7-f3d8-1d28-81e0b9e59c81",
"username": "actor",
"acct": "actor@pasture-one-actor",
"actor_id": "http://pasture-one-actor/actor",
"url": "http://pasture-one-actor/actor",
"display_name": "Test Actor",
"created_at": "2025-09-01T08:06:39.527Z",
"note": "",
"avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
"header": "http://mitra/api/v1/accounts/identicon",
"locked": false,
"mention_policy": "none",
"bot": false,
"identity_proofs": [],
"payment_options": [],
"fields": [],
"emojis": [],
"followers_count": 0,
"following_count": 0,
"subscribers_count": 0,
"statuses_count": 16,
"source": null,
"role": null,
"authentication_methods": null,
"client_config": null
},
"content": "no type \u26a0\ufe0f ",
"language": null,
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"visibility": "public",
"sensitive": false,
"spoiler_text": "",
"pinned": false,
"replies_count": 0,
"favourites_count": 0,
"reblogs_count": 0,
"poll": null,
"media_attachments": [],
"quote": null,
"mentions": [
{
"id": "0199044f-210f-d32c-985b-a33d9bffac0c",
"username": "admin",
"acct": "admin",
"url": "http://mitra/users/admin"
}
],
"tags": [
{
"name": "test",
"url": "http://mitra/collections/tags/test"
}
],
"emojis": [],
"favourited": false,
"reblogged": false,
"bookmarked": false,
"pleroma": {
"emoji_reactions": [],
"in_reply_to_account_acct": null,
"parent_visible": true,
"quote": null,
"quote_visible": true
},
"hidden": false,
"ipfs_cid": null,
"links": []
}
Example 4¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/activity/eA38ldI6Auc",
"published": "2025-09-01T08:07:02Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/object/PdyWF_LI9_w",
"published": "2025-09-01T08:07:02Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "01990450-bb85-d606-0bd3-a691c434b460",
"uri": "http://pasture-one-actor/object/PdyWF_LI9_w",
"url": "http://pasture-one-actor/object/PdyWF_LI9_w",
"created_at": "2025-09-01T08:07:02.000Z",
"edited_at": null,
"account": {
"id": "01990450-5ca7-f3d8-1d28-81e0b9e59c81",
"username": "actor",
"acct": "actor@pasture-one-actor",
"actor_id": "http://pasture-one-actor/actor",
"url": "http://pasture-one-actor/actor",
"display_name": "Test Actor",
"created_at": "2025-09-01T08:06:39.527Z",
"note": "",
"avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
"header": "http://mitra/api/v1/accounts/identicon",
"locked": false,
"mention_policy": "none",
"bot": false,
"identity_proofs": [],
"payment_options": [],
"fields": [],
"emojis": [],
"followers_count": 0,
"following_count": 0,
"subscribers_count": 0,
"statuses_count": 17,
"source": null,
"role": null,
"authentication_methods": null,
"client_config": null
},
"content": "Hashtag not in @context \u26a0\ufe0f ",
"language": null,
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"visibility": "public",
"sensitive": false,
"spoiler_text": "",
"pinned": false,
"replies_count": 0,
"favourites_count": 0,
"reblogs_count": 0,
"poll": null,
"media_attachments": [],
"quote": null,
"mentions": [
{
"id": "0199044f-210f-d32c-985b-a33d9bffac0c",
"username": "admin",
"acct": "admin",
"url": "http://mitra/users/admin"
}
],
"tags": [
{
"name": "test",
"url": "http://mitra/collections/tags/test"
}
],
"emojis": [],
"favourited": false,
"reblogged": false,
"bookmarked": false,
"pleroma": {
"emoji_reactions": [],
"in_reply_to_account_acct": null,
"parent_visible": true,
"quote": null,
"quote_visible": true
},
"hidden": false,
"ipfs_cid": null,
"links": []
}
Example 5¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/activity/BKWono8Jsx4",
"published": "2025-09-01T08:07:04Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mitra/users/admin"
],
"id": "http://pasture-one-actor/object/br86xcW4U_Y",
"published": "2025-09-01T08:07:04Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "01990450-c15e-9616-cd00-d7d13af16a5e",
"uri": "http://pasture-one-actor/object/br86xcW4U_Y",
"url": "http://pasture-one-actor/object/br86xcW4U_Y",
"created_at": "2025-09-01T08:07:04.000Z",
"edited_at": null,
"account": {
"id": "01990450-5ca7-f3d8-1d28-81e0b9e59c81",
"username": "actor",
"acct": "actor@pasture-one-actor",
"actor_id": "http://pasture-one-actor/actor",
"url": "http://pasture-one-actor/actor",
"display_name": "Test Actor",
"created_at": "2025-09-01T08:06:39.527Z",
"note": "",
"avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
"header": "http://mitra/api/v1/accounts/identicon",
"locked": false,
"mention_policy": "none",
"bot": false,
"identity_proofs": [],
"payment_options": [],
"fields": [],
"emojis": [],
"followers_count": 0,
"following_count": 0,
"subscribers_count": 0,
"statuses_count": 18,
"source": null,
"role": null,
"authentication_methods": null,
"client_config": null
},
"content": "Hashtag not in @context; as:Hashtag",
"language": null,
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"visibility": "public",
"sensitive": false,
"spoiler_text": "",
"pinned": false,
"replies_count": 0,
"favourites_count": 0,
"reblogs_count": 0,
"poll": null,
"media_attachments": [],
"quote": null,
"mentions": [
{
"id": "0199044f-210f-d32c-985b-a33d9bffac0c",
"username": "admin",
"acct": "admin",
"url": "http://mitra/users/admin"
}
],
"tags": [],
"emojis": [],
"favourited": false,
"reblogged": false,
"bookmarked": false,
"pleroma": {
"emoji_reactions": [],
"in_reply_to_account_acct": null,
"parent_visible": true,
"quote": null,
"quote_visible": true
},
"hidden": false,
"ipfs_cid": null,
"links": []
}