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://sharkey/users/acg3ru0zh3uf0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/L_903hwGKVU",
"published": "2025-09-09T12:41:57Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acg3ru0zh3uf0003"
],
"id": "http://pasture-one-actor/object/jYXvwSFQYOE",
"published": "2025-09-09T12:41:57Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
pyfedi
{
"id": 14,
"user_id": 2,
"community_id": 1,
"title": "(content in post body)",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-09T12:25:37.831150Z",
"ap_id": "http://pasture-one-actor/object/7jUveB4eWCc",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "text"
}
sharkey
{
"id": "acg3tssotn88000i",
"uri": "http://pasture-one-actor/object/jYXvwSFQYOE",
"url": "http://pasture-one-actor/object/jYXvwSFQYOE",
"account": {
"id": "acg3tlswtn880004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-09T12:41:47.936Z",
"followers_count": 0,
"following_count": 0,
"statuses_count": 14,
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
"avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
"header": "https://dev.joinsharkey.org/static-assets/transparent.png",
"header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
"emojis": [],
"moved": null,
"fields": [],
"bot": false,
"discoverable": true,
"noindex": false,
"group": null,
"suspended": false,
"limited": false
},
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"content": "<p>text</p>",
"content_type": "text/x.misskeymarkdown",
"text": "text",
"created_at": "2025-09-09T12:41:57.000Z",
"edited_at": null,
"emojis": [],
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"reblogged": false,
"favourited": false,
"muted": false,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"media_attachments": [],
"mentions": [],
"tags": [
{
"name": "test",
"url": "http://sharkey/tags/test"
}
],
"card": null,
"poll": null,
"application": null,
"language": null,
"pinned": false,
"bookmarked": false,
"quote": null,
"reactions": []
}
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://sharkey/users/acg3ru0zh3uf0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/w0HWr6yL1WM",
"published": "2025-09-09T12:41:57Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acg3ru0zh3uf0003"
],
"id": "http://pasture-one-actor/object/iuxQ4eUwyxg",
"published": "2025-09-09T12:41:57Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
pyfedi
{
"id": 15,
"user_id": 2,
"community_id": 1,
"title": "[Microblog] using as:Hashtag",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-09T12:25:38.593620Z",
"ap_id": "http://pasture-one-actor/object/-PeWAHv9HBY",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "using as:Hashtag"
}
sharkey
{
"id": "acg3tssotn88000k",
"uri": "http://pasture-one-actor/object/iuxQ4eUwyxg",
"url": "http://pasture-one-actor/object/iuxQ4eUwyxg",
"account": {
"id": "acg3tlswtn880004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-09T12:41:47.936Z",
"followers_count": 0,
"following_count": 0,
"statuses_count": 15,
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
"avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
"header": "https://dev.joinsharkey.org/static-assets/transparent.png",
"header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
"emojis": [],
"moved": null,
"fields": [],
"bot": false,
"discoverable": true,
"noindex": false,
"group": null,
"suspended": false,
"limited": false
},
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"content": "<p>using as:Hashtag</p>",
"content_type": "text/x.misskeymarkdown",
"text": "using as:Hashtag",
"created_at": "2025-09-09T12:41:57.000Z",
"edited_at": null,
"emojis": [],
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"reblogged": false,
"favourited": false,
"muted": false,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"media_attachments": [],
"mentions": [],
"tags": [],
"card": null,
"poll": null,
"application": null,
"language": null,
"pinned": false,
"bookmarked": false,
"quote": null,
"reactions": []
}
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://sharkey/users/acg3ru0zh3uf0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/YwKCDmQ0ZuA",
"published": "2025-09-09T12:41:58Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acg3ru0zh3uf0003"
],
"id": "http://pasture-one-actor/object/8uh_EEYbzdE",
"published": "2025-09-09T12:41:58Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
no result
sharkey
{
"id": "acg3ttkgtn88000l",
"uri": "http://pasture-one-actor/object/8uh_EEYbzdE",
"url": "http://pasture-one-actor/object/8uh_EEYbzdE",
"account": {
"id": "acg3tlswtn880004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-09T12:41:47.936Z",
"followers_count": 0,
"following_count": 0,
"statuses_count": 16,
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
"avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
"header": "https://dev.joinsharkey.org/static-assets/transparent.png",
"header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
"emojis": [],
"moved": null,
"fields": [],
"bot": false,
"discoverable": true,
"noindex": false,
"group": null,
"suspended": false,
"limited": false
},
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"content": "<p>no type \u26a0\ufe0f</p>",
"content_type": "text/x.misskeymarkdown",
"text": "no type \u26a0\ufe0f",
"created_at": "2025-09-09T12:41:58.000Z",
"edited_at": null,
"emojis": [],
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"reblogged": false,
"favourited": false,
"muted": false,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"media_attachments": [],
"mentions": [],
"tags": [],
"card": null,
"poll": null,
"application": null,
"language": null,
"pinned": false,
"bookmarked": false,
"quote": null,
"reactions": []
}
Example 4¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://sharkey/users/acg3ru0zh3uf0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/DnTi_rKPZHU",
"published": "2025-09-09T12:41:59Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acg3ru0zh3uf0003"
],
"id": "http://pasture-one-actor/object/NlgjYHAiZo0",
"published": "2025-09-09T12:41:59Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
pyfedi
{
"id": 16,
"user_id": 2,
"community_id": 1,
"title": "Hashtag not in @context \u26a0\ufe0f",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-09T12:25:51.438992Z",
"ap_id": "http://pasture-one-actor/object/_dmXODroTW4",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "Hashtag not in @context \u26a0\ufe0f "
}
sharkey
{
"id": "acg3tuc8tn88000m",
"uri": "http://pasture-one-actor/object/NlgjYHAiZo0",
"url": "http://pasture-one-actor/object/NlgjYHAiZo0",
"account": {
"id": "acg3tlswtn880004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-09T12:41:47.936Z",
"followers_count": 0,
"following_count": 0,
"statuses_count": 17,
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
"avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
"header": "https://dev.joinsharkey.org/static-assets/transparent.png",
"header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
"emojis": [],
"moved": null,
"fields": [],
"bot": false,
"discoverable": true,
"noindex": false,
"group": null,
"suspended": false,
"limited": false
},
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"content": "<p>Hashtag not in <span>@context</span> \u26a0\ufe0f</p>",
"content_type": "text/x.misskeymarkdown",
"text": "Hashtag not in @context \u26a0\ufe0f",
"created_at": "2025-09-09T12:41:59.000Z",
"edited_at": null,
"emojis": [],
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"reblogged": false,
"favourited": false,
"muted": false,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"media_attachments": [],
"mentions": [],
"tags": [
{
"name": "test",
"url": "http://sharkey/tags/test"
}
],
"card": null,
"poll": null,
"application": null,
"language": null,
"pinned": false,
"bookmarked": false,
"quote": null,
"reactions": []
}
Example 5¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://sharkey/users/acg3ru0zh3uf0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/5f1-V3RzO-E",
"published": "2025-09-09T12:42:00Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acg3ru0zh3uf0003"
],
"id": "http://pasture-one-actor/object/Qd_0ikOnQtQ",
"published": "2025-09-09T12:42:00Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
pyfedi
{
"id": 17,
"user_id": 2,
"community_id": 1,
"title": "Hashtag not in @context; as:Hashtag",
"deleted": false,
"nsfw": false,
"sticky": false,
"published": "2025-09-09T12:25:52.196473Z",
"ap_id": "http://pasture-one-actor/object/AeCbtAdsKFo",
"local": false,
"language_id": 2,
"removed": false,
"locked": false,
"body": "Hashtag not in @context; as:Hashtag"
}
sharkey
{
"id": "acg3tv40tn88000n",
"uri": "http://pasture-one-actor/object/Qd_0ikOnQtQ",
"url": "http://pasture-one-actor/object/Qd_0ikOnQtQ",
"account": {
"id": "acg3tlswtn880004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-09T12:41:47.936Z",
"followers_count": 0,
"following_count": 0,
"statuses_count": 18,
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
"avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
"header": "https://dev.joinsharkey.org/static-assets/transparent.png",
"header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
"emojis": [],
"moved": null,
"fields": [],
"bot": false,
"discoverable": true,
"noindex": false,
"group": null,
"suspended": false,
"limited": false
},
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"reblog": null,
"content": "<p>Hashtag not in <span>@context</span>; as:Hashtag</p>",
"content_type": "text/x.misskeymarkdown",
"text": "Hashtag not in @context; as:Hashtag",
"created_at": "2025-09-09T12:42:00.000Z",
"edited_at": null,
"emojis": [],
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"reblogged": false,
"favourited": false,
"muted": false,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"media_attachments": [],
"mentions": [],
"tags": [],
"card": null,
"poll": null,
"application": null,
"language": null,
"pinned": false,
"bookmarked": false,
"quote": null,
"reactions": []
}