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/xG_1qUJyVaY",
"published": "2025-09-03T18:24:07Z",
"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/UnWfJjso0mE",
"published": "2025-09-03T18:24:07Z",
"content": "text",
"tag": [
{
"type": "Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K48D4RAR3MTW4R025ZCSRRD0",
"created_at": "2025-09-03T18:24:07.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/UnWfJjso0mE",
"url": "http://pasture-one-actor/object/UnWfJjso0mE",
"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": "01K48D4GXYW9KT1VG7A7FX4SYD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-03T18:23:59.442Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-03T18:24:07.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "014HZBWCFX2KRE5R0YTT30X5C4",
"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/sUmYEzvQ92M",
"published": "2025-09-03T18:24:08Z",
"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/3O8gJ2AfppA",
"published": "2025-09-03T18:24:08Z",
"content": "using as:Hashtag",
"tag": [
{
"type": "as:Hashtag",
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K48D4SA058095P1B5DMWFF6Q",
"created_at": "2025-09-03T18:24:08.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/3O8gJ2AfppA",
"url": "http://pasture-one-actor/object/3O8gJ2AfppA",
"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": "01K48D4GXYW9KT1VG7A7FX4SYD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-03T18:23:59.442Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-03T18:24:08.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "014HZBWCFX2KRE5R0YTT30X5C4",
"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/lXInuVlNaoA",
"published": "2025-09-03T18:24:09Z",
"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/0gozSKiwXNY",
"published": "2025-09-03T18:24:09Z",
"content": "no type \u26a0\ufe0f ",
"tag": [
{
"name": "#test"
},
{
"type": "Mention",
"href": "http://gotosocial/users/cookie"
}
]
}
}
gotosocial
{
"id": "01K48D4T98E96RYXJGFH3NN6BY",
"created_at": "2025-09-03T18:24:09.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/0gozSKiwXNY",
"url": "http://pasture-one-actor/object/0gozSKiwXNY",
"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": "01K48D4GXYW9KT1VG7A7FX4SYD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-03T18:23:59.442Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-03T18:24:09.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "014HZBWCFX2KRE5R0YTT30X5C4",
"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/4GYM5RFtA_U",
"published": "2025-09-03T18:24:09Z",
"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/0mbKrzkOacc",
"published": "2025-09-03T18:24:09Z",
"@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": "01K48D4T98EMNMYB3ZEB02GA52",
"created_at": "2025-09-03T18:24:09.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/0mbKrzkOacc",
"url": "http://pasture-one-actor/object/0mbKrzkOacc",
"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": "01K48D4GXYW9KT1VG7A7FX4SYD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-03T18:23:59.442Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-03T18:24:09.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "014HZBWCFX2KRE5R0YTT30X5C4",
"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/pHy5qNJRgAE",
"published": "2025-09-03T18:24:10Z",
"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/rhlUU8hHnOQ",
"published": "2025-09-03T18:24:10Z",
"@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": "01K48D4V8G5WSCGD3ABT8C5WC2",
"created_at": "2025-09-03T18:24:10.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/rhlUU8hHnOQ",
"url": "http://pasture-one-actor/object/rhlUU8hHnOQ",
"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": "01K48D4GXYW9KT1VG7A7FX4SYD",
"username": "actor",
"acct": "actor@pasture-one-actor",
"display_name": "Test Actor",
"locked": true,
"discoverable": false,
"bot": false,
"created_at": "2025-09-03T18:23:59.442Z",
"note": "",
"url": "http://pasture-one-actor/actor",
"avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
"avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-03T18:24:10.000Z",
"emojis": [],
"fields": []
},
"media_attachments": [],
"mentions": [
{
"id": "014HZBWCFX2KRE5R0YTT30X5C4",
"username": "cookie",
"url": "http://gotosocial/@cookie",
"acct": "cookie"
}
],
"tags": [],
"emojis": [],
"card": null,
"poll": null
}