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.
Support Table Preview¶
tag | Object | Activity |
---|---|---|
#test | Object | Activity |
#test using as:Hashtag |
Object | Activity |
#test no type ⚠️ |
Object | Activity |
#test Hashtag not in @context ⚠️ |
Object | Activity |
#test Hashtag not in @context; as:Hashtag |
Object | Activity |
Objects¶
Object 1¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive"
}
],
"attributedTo": "http://actor.example",
"content": "text",
"id": "http://actor.example/object/w5FVuM7PcUI",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test",
"type": "Hashtag"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 2¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive"
}
],
"attributedTo": "http://actor.example",
"content": "using as:Hashtag",
"id": "http://actor.example/object/WRl-piu9P5s",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test",
"type": "as:Hashtag"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 3¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive"
}
],
"attributedTo": "http://actor.example",
"content": "no type \u26a0\ufe0f ",
"id": "http://actor.example/object/Z49QfDu_6-o",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 4¶
{
"@context": "https://www.w3.org/ns/activitystreams",
"attributedTo": "http://actor.example",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"id": "http://actor.example/object/0FkTK5MF1VM",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test",
"type": "Hashtag"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Object 5¶
{
"@context": "https://www.w3.org/ns/activitystreams",
"attributedTo": "http://actor.example",
"content": "Hashtag not in @context; as:Hashtag",
"id": "http://actor.example/object/DgAXob-yvqY",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test",
"type": "as:Hashtag"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"type": "Note"
}
Activities¶
Activity 1¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive"
}
],
"actor": "http://actor.example",
"id": "http://actor.example/activity/HwnyCVxJScU",
"object": {
"attributedTo": "http://actor.example",
"content": "text",
"id": "http://actor.example/object/lAn6c1OqK8U",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test",
"type": "Hashtag"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-09-09T09:32:39Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Create"
}
Activity 2¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive"
}
],
"actor": "http://actor.example",
"id": "http://actor.example/activity/bOt0Be1KGZE",
"object": {
"attributedTo": "http://actor.example",
"content": "using as:Hashtag",
"id": "http://actor.example/object/URrLhYbY288",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test",
"type": "as:Hashtag"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-09-09T09:32:39Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Create"
}
Activity 3¶
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive"
}
],
"actor": "http://actor.example",
"id": "http://actor.example/activity/f6SEdMQHdKw",
"object": {
"attributedTo": "http://actor.example",
"content": "no type \u26a0\ufe0f ",
"id": "http://actor.example/object/YDnG13zB1XI",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-09-09T09:32:39Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Create"
}
Activity 4¶
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "http://actor.example",
"id": "http://actor.example/activity/MFvAVT8cbrQ",
"object": {
"@context": "https://www.w3.org/ns/activitystreams",
"attributedTo": "http://actor.example",
"content": "Hashtag not in @context \u26a0\ufe0f ",
"id": "http://actor.example/object/LiFvvhIUyxs",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test",
"type": "Hashtag"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-09-09T09:32:39Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Create"
}
Activity 5¶
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "http://actor.example",
"id": "http://actor.example/activity/E0RREzNRv4c",
"object": {
"@context": "https://www.w3.org/ns/activitystreams",
"attributedTo": "http://actor.example",
"content": "Hashtag not in @context; as:Hashtag",
"id": "http://actor.example/object/2-ttb8HHRBU",
"published": "2025-09-09T09:32:39Z",
"tag": {
"name": "#test",
"type": "as:Hashtag"
},
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Note"
},
"published": "2025-09-09T09:32:39Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public",
"http://remote.example/"
],
"type": "Create"
}