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/By31VzrxWzo",
"published": "2025-08-30T17:35:08Z",
"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/T3RRMxNSL20",
"published": "2025-08-30T17:35:08Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "0198fc0c-1eff-71bf-d4cf-bcea10264d0b",
"uri": "http://pasture-one-actor/object/T3RRMxNSL20",
"url": "http://pasture-one-actor/object/T3RRMxNSL20",
"created_at": "2025-08-30T17:35:08.000Z",
"edited_at": null,
"account": {
"id": "0198fc0b-d02e-8afc-35ec-e315741d92c7",
"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-08-30T17:34:49.389Z",
"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": "0198fc0a-6f0d-ee21-7099-2614ad913244",
"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/SamGd1sudSA",
"published": "2025-08-30T17:35:09Z",
"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/HcRDPyRFtok",
"published": "2025-08-30T17:35:09Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "0198fc0c-24d7-c7dc-8b2f-769efb67bf84",
"uri": "http://pasture-one-actor/object/HcRDPyRFtok",
"url": "http://pasture-one-actor/object/HcRDPyRFtok",
"created_at": "2025-08-30T17:35:09.000Z",
"edited_at": null,
"account": {
"id": "0198fc0b-d02e-8afc-35ec-e315741d92c7",
"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-08-30T17:34:49.389Z",
"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": "0198fc0a-6f0d-ee21-7099-2614ad913244",
"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/Ey4vXqlK-s8",
"published": "2025-08-30T17:35:11Z",
"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/kXdfUgs-bI4",
"published": "2025-08-30T17:35:11Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
mitra
{
"id": "0198fc0c-2ab8-e445-a58b-e9e70d55e6b6",
"uri": "http://pasture-one-actor/object/kXdfUgs-bI4",
"url": "http://pasture-one-actor/object/kXdfUgs-bI4",
"created_at": "2025-08-30T17:35:11.000Z",
"edited_at": null,
"account": {
"id": "0198fc0b-d02e-8afc-35ec-e315741d92c7",
"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-08-30T17:34:49.389Z",
"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": "0198fc0a-6f0d-ee21-7099-2614ad913244",
"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/AjT8JaONPYQ",
"published": "2025-08-30T17:35:12Z",
"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/6povwQQL5Sg",
"published": "2025-08-30T17:35:12Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "0198fc0c-308c-287b-1fa0-89bbc3ec9a41",
"uri": "http://pasture-one-actor/object/6povwQQL5Sg",
"url": "http://pasture-one-actor/object/6povwQQL5Sg",
"created_at": "2025-08-30T17:35:12.000Z",
"edited_at": null,
"account": {
"id": "0198fc0b-d02e-8afc-35ec-e315741d92c7",
"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-08-30T17:34:49.389Z",
"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": "0198fc0a-6f0d-ee21-7099-2614ad913244",
"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/8WB4kBxk-9o",
"published": "2025-08-30T17:35:14Z",
"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/RKOlZjcc0p8",
"published": "2025-08-30T17:35:14Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "0198fc0c-366b-ea28-6cd4-0f0ff4e323fe",
"uri": "http://pasture-one-actor/object/RKOlZjcc0p8",
"url": "http://pasture-one-actor/object/RKOlZjcc0p8",
"created_at": "2025-08-30T17:35:14.000Z",
"edited_at": null,
"account": {
"id": "0198fc0b-d02e-8afc-35ec-e315741d92c7",
"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-08-30T17:34:49.389Z",
"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": "0198fc0a-6f0d-ee21-7099-2614ad913244",
"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": []
}