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://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/activity/CvPCA16Pj88",
"published": "2025-08-30T20:05:56Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/object/48SINLuP2aQ",
"published": "2025-08-30T20:05:56Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "ac29a8wwdzsd000i",
"uri": "http://pasture-one-actor/object/48SINLuP2aQ",
"url": "http://pasture-one-actor/object/48SINLuP2aQ",
"account": {
"id": "ac29a2nndzsd0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-08-30T20:05:47.891Z",
"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-08-30T20:05:56.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": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/activity/9y0X5jDnH0A",
"published": "2025-08-30T20:05:57Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/object/4naex2Twaj4",
"published": "2025-08-30T20:05:57Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "ac29a9oodzsd000k",
"uri": "http://pasture-one-actor/object/4naex2Twaj4",
"url": "http://pasture-one-actor/object/4naex2Twaj4",
"account": {
"id": "ac29a2nndzsd0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-08-30T20:05:47.891Z",
"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-08-30T20:05: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": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/activity/mRuY88Ez2-0",
"published": "2025-08-30T20:05:58Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/object/xtZPWO5tnY0",
"published": "2025-08-30T20:05:58Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
sharkey
{
"id": "ac29aaggdzsd000l",
"uri": "http://pasture-one-actor/object/xtZPWO5tnY0",
"url": "http://pasture-one-actor/object/xtZPWO5tnY0",
"account": {
"id": "ac29a2nndzsd0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-08-30T20:05:47.891Z",
"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-08-30T20:05: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": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/activity/V-fU89oXAyA",
"published": "2025-08-30T20:05:59Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/object/CtTBGC5qq5Y",
"published": "2025-08-30T20:05:59Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "ac29ab88dzsd000m",
"uri": "http://pasture-one-actor/object/CtTBGC5qq5Y",
"url": "http://pasture-one-actor/object/CtTBGC5qq5Y",
"account": {
"id": "ac29a2nndzsd0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-08-30T20:05:47.891Z",
"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-08-30T20:05: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": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/activity/TGnisbG40nM",
"published": "2025-08-30T20:05:59Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac2984fruahh0003"
],
"id": "http://pasture-one-actor/object/x694PBgkG-0",
"published": "2025-08-30T20:05:59Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "ac29ab88dzsd000n",
"uri": "http://pasture-one-actor/object/x694PBgkG-0",
"url": "http://pasture-one-actor/object/x694PBgkG-0",
"account": {
"id": "ac29a2nndzsd0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-08-30T20:05:47.891Z",
"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-08-30T20:05: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": [],
"card": null,
"poll": null,
"application": null,
"language": null,
"pinned": false,
"bookmarked": false,
"quote": null,
"reactions": []
}