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://hollo/@john"
],
"id": "http://pasture-one-actor/activity/dORbnh8mS2Q",
"published": "2025-09-03T18:34:04Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://hollo/@john"
],
"id": "http://pasture-one-actor/object/CPm4x0KOe1s",
"published": "2025-09-03T18:34:04Z",
"content": "text",
"tag": [
{
"type": "Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://hollo/@john"
}
]
}
}
hollo
{
"id": "019910db-7d60-71d1-92cd-be40b577b33f",
"created_at": "2025-09-03T18:34:04.000Z",
"in_reply_to_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/CPm4x0KOe1s",
"url": "http://pasture-one-actor/object/CPm4x0KOe1s",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "text",
"reblog": null,
"quote_id": null,
"quote": null,
"application": null,
"account": {
"id": "019910db-58b9-760a-a5c2-976f7dd9a687",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"created_at": "2025-09-03T18:33:54.563Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://hollo/image/avatars/original/missing.png",
"avatar_static": "http://hollo/image/avatars/original/missing.png",
"header": "http://hollo/image/headers/original/missing.png",
"header_static": "http://hollo/image/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 0,
"moved": null,
"last_status_at": null,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"card": null,
"emojis": [],
"emoji_reactions": [],
"poll": null,
"filtered": null
}
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://hollo/@john"
],
"id": "http://pasture-one-actor/activity/8EnzaY80lpE",
"published": "2025-09-03T18:34:05Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://hollo/@john"
],
"id": "http://pasture-one-actor/object/OAMOKLrepOw",
"published": "2025-09-03T18:34:05Z",
"content": "using as:Hashtag",
"tag": [
{
"type": "as:Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://hollo/@john"
}
]
}
}
hollo
{
"id": "019910db-8148-7d93-a9e2-eddf00e75aeb",
"created_at": "2025-09-03T18:34:05.000Z",
"in_reply_to_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/OAMOKLrepOw",
"url": "http://pasture-one-actor/object/OAMOKLrepOw",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "using as:Hashtag",
"reblog": null,
"quote_id": null,
"quote": null,
"application": null,
"account": {
"id": "019910db-58b9-760a-a5c2-976f7dd9a687",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"created_at": "2025-09-03T18:33:54.563Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://hollo/image/avatars/original/missing.png",
"avatar_static": "http://hollo/image/avatars/original/missing.png",
"header": "http://hollo/image/headers/original/missing.png",
"header_static": "http://hollo/image/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 0,
"moved": null,
"last_status_at": null,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"card": null,
"emojis": [],
"emoji_reactions": [],
"poll": null,
"filtered": null
}
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://hollo/@john"
],
"id": "http://pasture-one-actor/activity/Xy1lRFruPRM",
"published": "2025-09-03T18:34:05Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://hollo/@john"
],
"id": "http://pasture-one-actor/object/0jFOUbIGP3M",
"published": "2025-09-03T18:34:05Z",
"content": "no type \u26a0\ufe0f ",
"tag": [
{
"name": "#test"
},
{
"type": "Mention",
"href": "http://hollo/@john"
}
]
}
}
hollo
{
"id": "019910db-8148-7d93-a9e2-eddf0318e04f",
"created_at": "2025-09-03T18:34:05.000Z",
"in_reply_to_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/0jFOUbIGP3M",
"url": "http://pasture-one-actor/object/0jFOUbIGP3M",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "no type \u26a0\ufe0f ",
"reblog": null,
"quote_id": null,
"quote": null,
"application": null,
"account": {
"id": "019910db-58b9-760a-a5c2-976f7dd9a687",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"created_at": "2025-09-03T18:33:54.563Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://hollo/image/avatars/original/missing.png",
"avatar_static": "http://hollo/image/avatars/original/missing.png",
"header": "http://hollo/image/headers/original/missing.png",
"header_static": "http://hollo/image/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 0,
"moved": null,
"last_status_at": null,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"card": null,
"emojis": [],
"emoji_reactions": [],
"poll": null,
"filtered": null
}
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://hollo/@john"
],
"id": "http://pasture-one-actor/activity/t0nXV9CLcjs",
"published": "2025-09-03T18:34:06Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://hollo/@john"
],
"id": "http://pasture-one-actor/object/QQn6c_xUCzA",
"published": "2025-09-03T18:34:06Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": [
{
"type": "Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://hollo/@john"
}
]
}
}
hollo
{
"id": "019910db-8530-7c86-a0d8-2bc57ffb5e39",
"created_at": "2025-09-03T18:34:06.000Z",
"in_reply_to_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/QQn6c_xUCzA",
"url": "http://pasture-one-actor/object/QQn6c_xUCzA",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "Hashtag not in @context \u26a0\ufe0f ",
"reblog": null,
"quote_id": null,
"quote": null,
"application": null,
"account": {
"id": "019910db-58b9-760a-a5c2-976f7dd9a687",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"created_at": "2025-09-03T18:33:54.563Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://hollo/image/avatars/original/missing.png",
"avatar_static": "http://hollo/image/avatars/original/missing.png",
"header": "http://hollo/image/headers/original/missing.png",
"header_static": "http://hollo/image/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 0,
"moved": null,
"last_status_at": null,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"card": null,
"emojis": [],
"emoji_reactions": [],
"poll": null,
"filtered": null
}
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://hollo/@john"
],
"id": "http://pasture-one-actor/activity/C6cHL2wUAug",
"published": "2025-09-03T18:34:07Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://hollo/@john"
],
"id": "http://pasture-one-actor/object/Do25cU3KeOY",
"published": "2025-09-03T18:34:07Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": [
{
"type": "as:Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://hollo/@john"
}
]
}
}
hollo
{
"id": "019910db-8918-759e-bcdc-e66982eb9d53",
"created_at": "2025-09-03T18:34:07.000Z",
"in_reply_to_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/Do25cU3KeOY",
"url": "http://pasture-one-actor/object/Do25cU3KeOY",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "Hashtag not in @context; as:Hashtag",
"reblog": null,
"quote_id": null,
"quote": null,
"application": null,
"account": {
"id": "019910db-58b9-760a-a5c2-976f7dd9a687",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"created_at": "2025-09-03T18:33:54.563Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://hollo/image/avatars/original/missing.png",
"avatar_static": "http://hollo/image/avatars/original/missing.png",
"header": "http://hollo/image/headers/original/missing.png",
"header_static": "http://hollo/image/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 0,
"moved": null,
"last_status_at": null,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"card": null,
"emojis": [],
"emoji_reactions": [],
"poll": null,
"filtered": null
}