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/acbx5etyv0gq0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/smMXKKul_9g",
"published": "2025-09-06T14:25:20Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acbx5etyv0gq0003"
],
"id": "http://pasture-one-actor/object/8_ILxCwJrxY",
"published": "2025-09-06T14:25:20Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "acbx772813eo000i",
"uri": "http://pasture-one-actor/object/8_ILxCwJrxY",
"url": "http://pasture-one-actor/object/8_ILxCwJrxY",
"account": {
"id": "acbx70az13eo0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-06T14:25:11.243Z",
"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-06T14:25:20.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/acbx5etyv0gq0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/xWqMyx1NaSk",
"published": "2025-09-06T14:25:21Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acbx5etyv0gq0003"
],
"id": "http://pasture-one-actor/object/cyRmUBDv7bI",
"published": "2025-09-06T14:25:21Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "acbx77u013eo000k",
"uri": "http://pasture-one-actor/object/cyRmUBDv7bI",
"url": "http://pasture-one-actor/object/cyRmUBDv7bI",
"account": {
"id": "acbx70az13eo0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-06T14:25:11.243Z",
"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-06T14:25:21.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/acbx5etyv0gq0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/ym0FDlLuqfg",
"published": "2025-09-06T14:25:21Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acbx5etyv0gq0003"
],
"id": "http://pasture-one-actor/object/vHwNnFisoGk",
"published": "2025-09-06T14:25:21Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
sharkey
{
"id": "acbx77u013eo000l",
"uri": "http://pasture-one-actor/object/vHwNnFisoGk",
"url": "http://pasture-one-actor/object/vHwNnFisoGk",
"account": {
"id": "acbx70az13eo0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-06T14:25:11.243Z",
"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-06T14:25:21.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/acbx5etyv0gq0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/EZEuvC9mORo",
"published": "2025-09-06T14:25:22Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acbx5etyv0gq0003"
],
"id": "http://pasture-one-actor/object/VkaHzlZQrWo",
"published": "2025-09-06T14:25:22Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "acbx78ls13eo000m",
"uri": "http://pasture-one-actor/object/VkaHzlZQrWo",
"url": "http://pasture-one-actor/object/VkaHzlZQrWo",
"account": {
"id": "acbx70az13eo0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-06T14:25:11.243Z",
"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-06T14:25:22.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/acbx5etyv0gq0003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/XMK5vmTwL5o",
"published": "2025-09-06T14:25:23Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/acbx5etyv0gq0003"
],
"id": "http://pasture-one-actor/object/DyqjzvHRnzo",
"published": "2025-09-06T14:25:23Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "acbx79dk13eo000n",
"uri": "http://pasture-one-actor/object/DyqjzvHRnzo",
"url": "http://pasture-one-actor/object/DyqjzvHRnzo",
"account": {
"id": "acbx70az13eo0004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-06T14:25:11.243Z",
"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-06T14:25:23.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": []
}