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://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/activity/yYCbZ-KaURA",
"published": "2025-09-01T16:38:59Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/object/QCdl-w4rzLQ",
"published": "2025-09-01T16:38:59Z",
"content": "text",
"tag": [
{
"type": "Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K432AT5RD018XS6T6PXPHMHP",
"created_at": "2025-09-01T16:38:59.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/QCdl-w4rzLQ",
"url": "http://pasture-one-actor/object/QCdl-w4rzLQ",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "text",
"reblog": null,
"account": {
"id": "01K432AKHKDTGSPQWT577GVG51",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-01T16:38:52.221Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"header": "http://gotosocial/assets/default_header.png",
"header_static": "http://gotosocial/assets/default_header.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 14,
"last_status_at": "2025-09-01T16:38:59.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01Q27C6HW8VQDC6CMBY9ATZV0P",
"username": "cookie",
"url": "http://gotosocial/@cookie",
"acct": "cookie"
}
],
"tags": [
{
"name": "test",
"url": "http://gotosocial/tags/test"
}
],
"emojis": [],
"card": null,
"poll": null
}
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://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/activity/dKJ-m5WgwFM",
"published": "2025-09-01T16:39:00Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/object/GHcefkiF8Dk",
"published": "2025-09-01T16:39:00Z",
"content": "using as:Hashtag",
"tag": [
{
"type": "as:Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K432AV509PGQK0ARD89K06HK",
"created_at": "2025-09-01T16:39:00.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/GHcefkiF8Dk",
"url": "http://pasture-one-actor/object/GHcefkiF8Dk",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "using as:Hashtag",
"reblog": null,
"account": {
"id": "01K432AKHKDTGSPQWT577GVG51",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-01T16:38:52.221Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"header": "http://gotosocial/assets/default_header.png",
"header_static": "http://gotosocial/assets/default_header.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 15,
"last_status_at": "2025-09-01T16:39:00.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01Q27C6HW8VQDC6CMBY9ATZV0P",
"username": "cookie",
"url": "http://gotosocial/@cookie",
"acct": "cookie"
}
],
"tags": [],
"emojis": [],
"card": null,
"poll": null
}
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://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/activity/0F57NuuHFA4",
"published": "2025-09-01T16:39:00Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/object/Cq9qzhsG6XM",
"published": "2025-09-01T16:39:00Z",
"content": "no type \u26a0\ufe0f ",
"tag": [
{
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K432AV50Q0RZMG4KGRCS646W",
"created_at": "2025-09-01T16:39:00.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/Cq9qzhsG6XM",
"url": "http://pasture-one-actor/object/Cq9qzhsG6XM",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "no type \u26a0\ufe0f",
"reblog": null,
"account": {
"id": "01K432AKHKDTGSPQWT577GVG51",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-01T16:38:52.221Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"header": "http://gotosocial/assets/default_header.png",
"header_static": "http://gotosocial/assets/default_header.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 16,
"last_status_at": "2025-09-01T16:39:00.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01Q27C6HW8VQDC6CMBY9ATZV0P",
"username": "cookie",
"url": "http://gotosocial/@cookie",
"acct": "cookie"
}
],
"tags": [],
"emojis": [],
"card": null,
"poll": null
}
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://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/activity/rMtJDfyDHGo",
"published": "2025-09-01T16:39:01Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/object/vSz0F4CUukY",
"published": "2025-09-01T16:39:01Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": [
{
"type": "Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K432AW48H7M5A9FTPAHA8RJ3",
"created_at": "2025-09-01T16:39:01.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/vSz0F4CUukY",
"url": "http://pasture-one-actor/object/vSz0F4CUukY",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "Hashtag not in @context \u26a0\ufe0f",
"reblog": null,
"account": {
"id": "01K432AKHKDTGSPQWT577GVG51",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-01T16:38:52.221Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"header": "http://gotosocial/assets/default_header.png",
"header_static": "http://gotosocial/assets/default_header.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 17,
"last_status_at": "2025-09-01T16:39:01.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01Q27C6HW8VQDC6CMBY9ATZV0P",
"username": "cookie",
"url": "http://gotosocial/@cookie",
"acct": "cookie"
}
],
"tags": [
{
"name": "test",
"url": "http://gotosocial/tags/test"
}
],
"emojis": [],
"card": null,
"poll": null
}
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://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/activity/yKrzZS-CvHg",
"published": "2025-09-01T16:39:02Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://gotosocial/users/cookie"
],
"id": "http://pasture-one-actor/object/tkzRzuPbKeE",
"published": "2025-09-01T16:39:02Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": [
{
"type": "as:Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K432AX3GGGB5XWB2DYZJPF0A",
"created_at": "2025-09-01T16:39:02.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/tkzRzuPbKeE",
"url": "http://pasture-one-actor/object/tkzRzuPbKeE",
"replies_count": 0,
"reblogs_count": 0,
"favourites_count": 0,
"favourited": false,
"reblogged": false,
"muted": false,
"bookmarked": false,
"pinned": false,
"content": "Hashtag not in @context; as:Hashtag",
"reblog": null,
"account": {
"id": "01K432AKHKDTGSPQWT577GVG51",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-01T16:38:52.221Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon3.png",
"header": "http://gotosocial/assets/default_header.png",
"header_static": "http://gotosocial/assets/default_header.png",
"followers_count": 0,
"following_count": 0,
"statuses_count": 18,
"last_status_at": "2025-09-01T16:39:02.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01Q27C6HW8VQDC6CMBY9ATZV0P",
"username": "cookie",
"url": "http://gotosocial/@cookie",
"acct": "cookie"
}
],
"tags": [],
"emojis": [],
"card": null,
"poll": null
}