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://mitra/users/admin",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/K0Lt0vELQrU",
"published": "2025-08-30T19:40:43Z",
"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/lIBjTiIRVhg",
"published": "2025-08-30T19:40:43Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "0198fc7f-18e8-9cb0-cdbf-bf67e58cdbe8",
"uri": "http://pasture-one-actor/object/lIBjTiIRVhg",
"url": "http://pasture-one-actor/object/lIBjTiIRVhg",
"created_at": "2025-08-30T19:40:43.000Z",
"edited_at": null,
"account": {
"id": "0198fc7e-c86c-4794-ff91-849511c2819a",
"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-30T19:40:24.044Z",
"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": "0198fc7d-556c-6206-a6af-7434c71ae20f",
"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": [
"http://mitra/users/admin",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/NbkNObCP-aM",
"published": "2025-08-30T19:40:45Z",
"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/GlmzkGoa78Q",
"published": "2025-08-30T19:40:45Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "0198fc7f-1ebd-036a-510e-c002fb6fba86",
"uri": "http://pasture-one-actor/object/GlmzkGoa78Q",
"url": "http://pasture-one-actor/object/GlmzkGoa78Q",
"created_at": "2025-08-30T19:40:45.000Z",
"edited_at": null,
"account": {
"id": "0198fc7e-c86c-4794-ff91-849511c2819a",
"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-30T19:40:24.044Z",
"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": "0198fc7d-556c-6206-a6af-7434c71ae20f",
"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": [
"http://mitra/users/admin",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/UdOpcTJ5cDM",
"published": "2025-08-30T19:40:46Z",
"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/kt6-DNTHVWg",
"published": "2025-08-30T19:40:46Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
mitra
{
"id": "0198fc7f-249a-38d6-5bda-c1c3c1dd2480",
"uri": "http://pasture-one-actor/object/kt6-DNTHVWg",
"url": "http://pasture-one-actor/object/kt6-DNTHVWg",
"created_at": "2025-08-30T19:40:46.000Z",
"edited_at": null,
"account": {
"id": "0198fc7e-c86c-4794-ff91-849511c2819a",
"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-30T19:40:24.044Z",
"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": "0198fc7d-556c-6206-a6af-7434c71ae20f",
"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": [
"http://mitra/users/admin",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/giQToA2L6xM",
"published": "2025-08-30T19:40:48Z",
"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/RUNhxT5OwXU",
"published": "2025-08-30T19:40:48Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "0198fc7f-2a6b-f0ab-16ef-74c38c69307d",
"uri": "http://pasture-one-actor/object/RUNhxT5OwXU",
"url": "http://pasture-one-actor/object/RUNhxT5OwXU",
"created_at": "2025-08-30T19:40:48.000Z",
"edited_at": null,
"account": {
"id": "0198fc7e-c86c-4794-ff91-849511c2819a",
"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-30T19:40:24.044Z",
"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": "0198fc7d-556c-6206-a6af-7434c71ae20f",
"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": [
"http://mitra/users/admin",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/_BibfT-oyik",
"published": "2025-08-30T19:40:49Z",
"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/mZR33HHUen0",
"published": "2025-08-30T19:40:49Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
mitra
{
"id": "0198fc7f-3050-059e-5c29-3b05d99476ab",
"uri": "http://pasture-one-actor/object/mZR33HHUen0",
"url": "http://pasture-one-actor/object/mZR33HHUen0",
"created_at": "2025-08-30T19:40:49.000Z",
"edited_at": null,
"account": {
"id": "0198fc7e-c86c-4794-ff91-849511c2819a",
"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-30T19:40:24.044Z",
"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": "0198fc7d-556c-6206-a6af-7434c71ae20f",
"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": []
}