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://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/Dppk5hyteng",
"published": "2025-11-21T13:24:27Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/F7Drcr0-ZBE",
"published": "2025-11-21T13:24:27Z",
"content": "text",
"tag": [
{
"type": "Hashtag",
"name": "#test"
}
]
}
}
mastodon
{
"id": "115587905438556975",
"created_at": "2025-11-21T13:24:27.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/F7Drcr0-ZBE",
"url": "http://pasture-one-actor/object/F7Drcr0-ZBE",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "text",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 14,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [
{
"name": "test",
"url": "http://mastodon/tags/test"
}
],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
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://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/e4AAvvb1luw",
"published": "2025-11-21T13:24:27Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/KHGvCqXxG7c",
"published": "2025-11-21T13:24:27Z",
"content": "using as:Hashtag",
"tag": [
{
"type": "as:Hashtag",
"name": "#test"
}
]
}
}
mastodon
{
"id": "115587905496747462",
"created_at": "2025-11-21T13:24:27.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/KHGvCqXxG7c",
"url": "http://pasture-one-actor/object/KHGvCqXxG7c",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "using as:Hashtag",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 15,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
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://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/5YfYOvLnXYM",
"published": "2025-11-21T13:24:28Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/av9-hN-nU08",
"published": "2025-11-21T13:24:28Z",
"content": "no type \u26a0\ufe0f ",
"tag": [
{
"name": "#test"
}
]
}
}
mastodon
{
"id": "115587905555987798",
"created_at": "2025-11-21T13:24:28.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/av9-hN-nU08",
"url": "http://pasture-one-actor/object/av9-hN-nU08",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "no type \u26a0\ufe0f ",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 16,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
Example 4¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/kaB2OH7XUWQ",
"published": "2025-11-21T13:24:29Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/mlCVDXk6ojY",
"published": "2025-11-21T13:24:29Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": [
{
"type": "Hashtag",
"name": "#test"
}
]
}
}
mastodon
{
"id": "115587905613147424",
"created_at": "2025-11-21T13:24:29.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/mlCVDXk6ojY",
"url": "http://pasture-one-actor/object/mlCVDXk6ojY",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "Hashtag not in @context \u26a0\ufe0f ",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 17,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [
{
"name": "test",
"url": "http://mastodon/tags/test"
}
],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}
Example 5¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://mastodon/users/hippo",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/QOsf93CJAS4",
"published": "2025-11-21T13:24:30Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://mastodon/users/hippo"
],
"id": "http://pasture-one-actor/object/sRSJmDDVOek",
"published": "2025-11-21T13:24:30Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": [
{
"type": "as:Hashtag",
"name": "#test"
}
]
}
}
mastodon
{
"id": "115587905669323883",
"created_at": "2025-11-21T13:24:30.000Z",
"in_reply_to_id": null,
"in_reply_to_account_id": null,
"sensitive": false,
"spoiler_text": "",
"visibility": "public",
"language": null,
"uri": "http://pasture-one-actor/object/sRSJmDDVOek",
"url": "http://pasture-one-actor/object/sRSJmDDVOek",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"quotes_count": 0,
"edited_at": null,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"content": "Hashtag not in @context; as:Hashtag",
"filtered": [],
"reblog": null,
"account": {
"id": "115587904635725355",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": false,
"bot": false,
"discoverable": false,
"indexable": false,
"group": false,
"created_at": "2025-11-21T00:00:00.000Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"uri": "http://pasture-one-actor/actor",
"avatar": "http://localhost:2970/system/avatars/original/missing.png",
"avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
"header": "http://localhost:2970/system/headers/original/missing.png",
"header_static": "http://localhost:2970/system/headers/original/missing.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 18,
"last_status_at": "2025-11-21",
"hide_collections": true,
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [],
"tags": [],
"emojis": [],
"quote": null,
"card": null,
"poll": null,
"quote_approval": {
"automatic": [],
"manual": [],
"current_user": "denied"
}
}