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/ovGockpVKdM",
"published": "2025-08-30T18:56:56Z",
"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/ToPaMd2PeQg",
"published": "2025-08-30T18:56:56Z",
"content": "text",
"tag": [
{
"type": "Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K3Y5DZ60NBZH2958VGS7NZB4",
"created_at": "2025-08-30T18:56:56.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/ToPaMd2PeQg",
"url": "http://pasture-one-actor/object/ToPaMd2PeQg",
"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": "01K3Y5DQCATKE3219T6HGE9WRD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-08-30T18:56:48.022Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.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-08-30T18:56:56.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01JWFBJTXM7GDMXXK40GW9WXT9",
"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/IW_rr18h4Mg",
"published": "2025-08-30T18:56:57Z",
"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/vy39xQlDTS4",
"published": "2025-08-30T18:56:57Z",
"content": "using as:Hashtag",
"tag": [
{
"type": "as:Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K3Y5E058BP9VY9F0HMS7WH37",
"created_at": "2025-08-30T18:56:57.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/vy39xQlDTS4",
"url": "http://pasture-one-actor/object/vy39xQlDTS4",
"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": "01K3Y5DQCATKE3219T6HGE9WRD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-08-30T18:56:48.022Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.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-08-30T18:56:57.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01JWFBJTXM7GDMXXK40GW9WXT9",
"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/DJZxeyJHCvM",
"published": "2025-08-30T18:56:58Z",
"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/Si6znbr5wQA",
"published": "2025-08-30T18:56:58Z",
"content": "no type \u26a0\ufe0f ",
"tag": [
{
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K3Y5E14GQEY6SSV37PYCRZPF",
"created_at": "2025-08-30T18:56:58.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/Si6znbr5wQA",
"url": "http://pasture-one-actor/object/Si6znbr5wQA",
"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": "01K3Y5DQCATKE3219T6HGE9WRD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-08-30T18:56:48.022Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.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-08-30T18:56:58.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01JWFBJTXM7GDMXXK40GW9WXT9",
"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/oyP0uzq_igo",
"published": "2025-08-30T18:56:58Z",
"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/YHwDtjxzGSM",
"published": "2025-08-30T18:56:58Z",
"@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": "01K3Y5E14G34YTY4QWP2V1HNN1",
"created_at": "2025-08-30T18:56:58.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/YHwDtjxzGSM",
"url": "http://pasture-one-actor/object/YHwDtjxzGSM",
"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": "01K3Y5DQCATKE3219T6HGE9WRD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-08-30T18:56:48.022Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.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-08-30T18:56:58.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01JWFBJTXM7GDMXXK40GW9WXT9",
"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/PpsV7FFH3SE",
"published": "2025-08-30T18:56: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/5k_gxagyJOg",
"published": "2025-08-30T18:56:59Z",
"@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": "01K3Y5E23RTJY0NKRXPWJ8XDQ5",
"created_at": "2025-08-30T18:56: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/5k_gxagyJOg",
"url": "http://pasture-one-actor/object/5k_gxagyJOg",
"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": "01K3Y5DQCATKE3219T6HGE9WRD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-08-30T18:56:48.022Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.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-08-30T18:56:59.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "01JWFBJTXM7GDMXXK40GW9WXT9",
"username": "cookie",
"url": "http://gotosocial/@cookie",
"acct": "cookie"
}
],
"tags": [],
"emojis": [],
"card": null,
"poll": null
}