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/ac4f96i4gb150003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/YBsiqEjqfi0",
"published": "2025-09-01T08:30:00Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac4f96i4gb150003"
],
"id": "http://pasture-one-actor/object/wAvtTibuWd8",
"published": "2025-09-01T08:30:00Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "ac4faz40ttj5000i",
"uri": "http://pasture-one-actor/object/wAvtTibuWd8",
"url": "http://pasture-one-actor/object/wAvtTibuWd8",
"account": {
"id": "ac4fasvattj50004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-01T08:29:51.910Z",
"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-01T08:30: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": [
{
"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/ac4f96i4gb150003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/66ubvNrUsPg",
"published": "2025-09-01T08:30:01Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac4f96i4gb150003"
],
"id": "http://pasture-one-actor/object/SC0erIHwO08",
"published": "2025-09-01T08:30:01Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "ac4fazvsttj5000k",
"uri": "http://pasture-one-actor/object/SC0erIHwO08",
"url": "http://pasture-one-actor/object/SC0erIHwO08",
"account": {
"id": "ac4fasvattj50004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-01T08:29:51.910Z",
"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-01T08:30:01.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/ac4f96i4gb150003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/tQRTn5Q_tvk",
"published": "2025-09-01T08:30:02Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac4f96i4gb150003"
],
"id": "http://pasture-one-actor/object/EplTE_1BWuY",
"published": "2025-09-01T08:30:02Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
sharkey
{
"id": "ac4fb0nkttj5000l",
"uri": "http://pasture-one-actor/object/EplTE_1BWuY",
"url": "http://pasture-one-actor/object/EplTE_1BWuY",
"account": {
"id": "ac4fasvattj50004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-01T08:29:51.910Z",
"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-01T08:30:02.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/ac4f96i4gb150003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/wsu03XuxbRc",
"published": "2025-09-01T08:30:03Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac4f96i4gb150003"
],
"id": "http://pasture-one-actor/object/2ZWga1FBEHc",
"published": "2025-09-01T08:30:03Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "ac4fb1fcttj5000m",
"uri": "http://pasture-one-actor/object/2ZWga1FBEHc",
"url": "http://pasture-one-actor/object/2ZWga1FBEHc",
"account": {
"id": "ac4fasvattj50004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-01T08:29:51.910Z",
"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-01T08:30:03.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/ac4f96i4gb150003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/EFh-iPo2jII",
"published": "2025-09-01T08:30:03Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://sharkey/users/ac4f96i4gb150003"
],
"id": "http://pasture-one-actor/object/wCqEPcOtC7E",
"published": "2025-09-01T08:30:03Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
sharkey
{
"id": "ac4fb1fcttj5000n",
"uri": "http://pasture-one-actor/object/wCqEPcOtC7E",
"url": "http://pasture-one-actor/object/wCqEPcOtC7E",
"account": {
"id": "ac4fasvattj50004",
"username": "actor",
"acct": "actor@pasture-one-actor",
"fqn": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"created_at": "2025-09-01T08:29:51.910Z",
"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-01T08:30:03.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": []
}