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://misskey/users/ac4e509pcgy40003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/8Y73l0mZgYQ",
"published": "2025-09-01T07:58:45Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://misskey/users/ac4e509pcgy40003"
],
"id": "http://pasture-one-actor/object/3R_ZdaEs098",
"published": "2025-09-01T07:58:45Z",
"content": "text",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
misskey
{
"id": "ac4e6sco3xwh000i",
"createdAt": "2025-09-01T07:58:45.000Z",
"userId": "ac4e6lk83xwh0003",
"user": {
"id": "ac4e6lk83xwh0003",
"name": "Test Actor",
"username": "actor",
"host": "pasture-one-actor",
"avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
"avatarBlurhash": null,
"avatarDecorations": [],
"isBot": false,
"isCat": false,
"instance": {
"name": null,
"softwareName": null,
"softwareVersion": null,
"iconUrl": null,
"faviconUrl": null,
"themeColor": null
},
"emojis": {},
"onlineStatus": "unknown"
},
"text": "text",
"cw": null,
"visibility": "public",
"localOnly": false,
"reactionAcceptance": null,
"renoteCount": 0,
"repliesCount": 0,
"reactionCount": 0,
"reactions": {},
"reactionEmojis": {},
"emojis": {},
"tags": [
"test"
],
"fileIds": [],
"files": [],
"replyId": null,
"renoteId": null,
"uri": "http://pasture-one-actor/object/3R_ZdaEs098",
"clippedCount": 0
}
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://misskey/users/ac4e509pcgy40003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/9-QQwr4kFSI",
"published": "2025-09-01T07:58:45Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://misskey/users/ac4e509pcgy40003"
],
"id": "http://pasture-one-actor/object/Owq7qZvJGG8",
"published": "2025-09-01T07:58:45Z",
"content": "using as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
misskey
{
"id": "ac4e6sco3xwh000k",
"createdAt": "2025-09-01T07:58:45.000Z",
"userId": "ac4e6lk83xwh0003",
"user": {
"id": "ac4e6lk83xwh0003",
"name": "Test Actor",
"username": "actor",
"host": "pasture-one-actor",
"avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
"avatarBlurhash": null,
"avatarDecorations": [],
"isBot": false,
"isCat": false,
"instance": {
"name": null,
"softwareName": null,
"softwareVersion": null,
"iconUrl": null,
"faviconUrl": null,
"themeColor": null
},
"emojis": {},
"onlineStatus": "unknown"
},
"text": "using as:Hashtag",
"cw": null,
"visibility": "public",
"localOnly": false,
"reactionAcceptance": null,
"renoteCount": 0,
"repliesCount": 0,
"reactionCount": 0,
"reactions": {},
"reactionEmojis": {},
"emojis": {},
"fileIds": [],
"files": [],
"replyId": null,
"renoteId": null,
"uri": "http://pasture-one-actor/object/Owq7qZvJGG8",
"clippedCount": 0
}
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://misskey/users/ac4e509pcgy40003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/2bdOqHJj760",
"published": "2025-09-01T07:58:46Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://misskey/users/ac4e509pcgy40003"
],
"id": "http://pasture-one-actor/object/66Re6uypJI0",
"published": "2025-09-01T07:58:46Z",
"content": "no type \u26a0\ufe0f ",
"tag": {
"name": "#test"
}
}
}
misskey
{
"id": "ac4e6t4g3xwh000l",
"createdAt": "2025-09-01T07:58:46.000Z",
"userId": "ac4e6lk83xwh0003",
"user": {
"id": "ac4e6lk83xwh0003",
"name": "Test Actor",
"username": "actor",
"host": "pasture-one-actor",
"avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
"avatarBlurhash": null,
"avatarDecorations": [],
"isBot": false,
"isCat": false,
"instance": {
"name": null,
"softwareName": null,
"softwareVersion": null,
"iconUrl": null,
"faviconUrl": null,
"themeColor": null
},
"emojis": {},
"onlineStatus": "unknown"
},
"text": "no type \u26a0\ufe0f",
"cw": null,
"visibility": "public",
"localOnly": false,
"reactionAcceptance": null,
"renoteCount": 0,
"repliesCount": 0,
"reactionCount": 0,
"reactions": {},
"reactionEmojis": {},
"emojis": {},
"fileIds": [],
"files": [],
"replyId": null,
"renoteId": null,
"uri": "http://pasture-one-actor/object/66Re6uypJI0",
"clippedCount": 0
}
Example 4¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://misskey/users/ac4e509pcgy40003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/VhUw9e6amuo",
"published": "2025-09-01T07:58:47Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://misskey/users/ac4e509pcgy40003"
],
"id": "http://pasture-one-actor/object/W81VQ40SIXo",
"published": "2025-09-01T07:58:47Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"tag": {
"type": "Hashtag",
"name": "#test"
}
}
}
misskey
{
"id": "ac4e6tw83xwh000m",
"createdAt": "2025-09-01T07:58:47.000Z",
"userId": "ac4e6lk83xwh0003",
"user": {
"id": "ac4e6lk83xwh0003",
"name": "Test Actor",
"username": "actor",
"host": "pasture-one-actor",
"avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
"avatarBlurhash": null,
"avatarDecorations": [],
"isBot": false,
"isCat": false,
"instance": {
"name": null,
"softwareName": null,
"softwareVersion": null,
"iconUrl": null,
"faviconUrl": null,
"themeColor": null
},
"emojis": {},
"onlineStatus": "unknown"
},
"text": "Hashtag not in @context \u26a0\ufe0f",
"cw": null,
"visibility": "public",
"localOnly": false,
"reactionAcceptance": null,
"renoteCount": 0,
"repliesCount": 0,
"reactionCount": 0,
"reactions": {},
"reactionEmojis": {},
"emojis": {},
"tags": [
"test"
],
"fileIds": [],
"files": [],
"replyId": null,
"renoteId": null,
"uri": "http://pasture-one-actor/object/W81VQ40SIXo",
"clippedCount": 0
}
Example 5¶
activity
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"actor": "http://pasture-one-actor/actor",
"to": [
"http://misskey/users/ac4e509pcgy40003",
"https://www.w3.org/ns/activitystreams#Public"
],
"id": "http://pasture-one-actor/activity/82jkzMJWsLQ",
"published": "2025-09-01T07:58:47Z",
"object": {
"type": "Note",
"attributedTo": "http://pasture-one-actor/actor",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://misskey/users/ac4e509pcgy40003"
],
"id": "http://pasture-one-actor/object/Rn8uFXeSdCo",
"published": "2025-09-01T07:58:47Z",
"@context": "https://www.w3.org/ns/activitystreams",
"content": "Hashtag not in @context; as:Hashtag",
"tag": {
"type": "as:Hashtag",
"name": "#test"
}
}
}
misskey
{
"id": "ac4e6tw83xwh000n",
"createdAt": "2025-09-01T07:58:47.000Z",
"userId": "ac4e6lk83xwh0003",
"user": {
"id": "ac4e6lk83xwh0003",
"name": "Test Actor",
"username": "actor",
"host": "pasture-one-actor",
"avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
"avatarBlurhash": null,
"avatarDecorations": [],
"isBot": false,
"isCat": false,
"instance": {
"name": null,
"softwareName": null,
"softwareVersion": null,
"iconUrl": null,
"faviconUrl": null,
"themeColor": null
},
"emojis": {},
"onlineStatus": "unknown"
},
"text": "Hashtag not in @context; as:Hashtag",
"cw": null,
"visibility": "public",
"localOnly": false,
"reactionAcceptance": null,
"renoteCount": 0,
"repliesCount": 0,
"reactionCount": 0,
"reactions": {},
"reactionEmojis": {},
"emojis": {},
"fileIds": [],
"files": [],
"replyId": null,
"renoteId": null,
"uri": "http://pasture-one-actor/object/Rn8uFXeSdCo",
"clippedCount": 0
}