Skip to content

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://sharkey/users/afcj40xfmzy00003"
  ],
  "id": "http://pasture-one-actor/activity/8wz1KWHnzcw",
  "published": "2025-11-21T14:39:14Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://sharkey/users/afcj40xfmzy00003"
    ],
    "id": "http://pasture-one-actor/object/6ptOcTDqOuY",
    "published": "2025-11-21T14:39:14Z",
    "content": "text",
    "tag": [
      {
        "type": "Hashtag",
        "name": "#test"
      }
    ]
  }
}
sharkey
{
  "id": "afcj5t8wjudd000i",
  "uri": "http://pasture-one-actor/object/6ptOcTDqOuY",
  "url": "http://pasture-one-actor/object/6ptOcTDqOuY",
  "account": {
    "id": "afcj5n5wjudd0004",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "fqn": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "created_at": "2025-11-21T14:39:06.116Z",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 14,
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "header": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "emojis": [],
    "moved": null,
    "fields": [],
    "bot": false,
    "discoverable": true,
    "noindex": false,
    "group": null,
    "suspended": false,
    "limited": false
  },
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "content": "<p>text</p>",
  "content_type": "text/x.misskeymarkdown",
  "text": "text",
  "created_at": "2025-11-21T14:39:14.000Z",
  "edited_at": null,
  "emojis": [],
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "reblogged": false,
  "favourited": false,
  "muted": false,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "media_attachments": [],
  "mentions": [],
  "tags": [
    {
      "name": "test",
      "url": "http://sharkey/tags/test"
    }
  ],
  "card": null,
  "poll": null,
  "application": null,
  "language": null,
  "pinned": false,
  "bookmarked": false,
  "quote": null,
  "reactions": []
}

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://sharkey/users/afcj40xfmzy00003"
  ],
  "id": "http://pasture-one-actor/activity/434HHb4U3oQ",
  "published": "2025-11-21T14:39:14Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://sharkey/users/afcj40xfmzy00003"
    ],
    "id": "http://pasture-one-actor/object/ZTOySIGm-7k",
    "published": "2025-11-21T14:39:14Z",
    "content": "using as:Hashtag",
    "tag": [
      {
        "type": "as:Hashtag",
        "name": "#test"
      }
    ]
  }
}
sharkey
{
  "id": "afcj5t8wjudd000k",
  "uri": "http://pasture-one-actor/object/ZTOySIGm-7k",
  "url": "http://pasture-one-actor/object/ZTOySIGm-7k",
  "account": {
    "id": "afcj5n5wjudd0004",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "fqn": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "created_at": "2025-11-21T14:39:06.116Z",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 15,
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "header": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "emojis": [],
    "moved": null,
    "fields": [],
    "bot": false,
    "discoverable": true,
    "noindex": false,
    "group": null,
    "suspended": false,
    "limited": false
  },
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "content": "<p>using as:Hashtag</p>",
  "content_type": "text/x.misskeymarkdown",
  "text": "using as:Hashtag",
  "created_at": "2025-11-21T14:39:14.000Z",
  "edited_at": null,
  "emojis": [],
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "reblogged": false,
  "favourited": false,
  "muted": false,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "card": null,
  "poll": null,
  "application": null,
  "language": null,
  "pinned": false,
  "bookmarked": false,
  "quote": null,
  "reactions": []
}

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://sharkey/users/afcj40xfmzy00003"
  ],
  "id": "http://pasture-one-actor/activity/xVNDuy-3Jk4",
  "published": "2025-11-21T14:39:15Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://sharkey/users/afcj40xfmzy00003"
    ],
    "id": "http://pasture-one-actor/object/89rPcNtwi6E",
    "published": "2025-11-21T14:39:15Z",
    "content": "no type \u26a0\ufe0f ",
    "tag": [
      {
        "name": "#test"
      }
    ]
  }
}
sharkey
{
  "id": "afcj5u0ojudd000l",
  "uri": "http://pasture-one-actor/object/89rPcNtwi6E",
  "url": "http://pasture-one-actor/object/89rPcNtwi6E",
  "account": {
    "id": "afcj5n5wjudd0004",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "fqn": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "created_at": "2025-11-21T14:39:06.116Z",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 16,
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "header": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "emojis": [],
    "moved": null,
    "fields": [],
    "bot": false,
    "discoverable": true,
    "noindex": false,
    "group": null,
    "suspended": false,
    "limited": false
  },
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "content": "<p>no type \u26a0\ufe0f</p>",
  "content_type": "text/x.misskeymarkdown",
  "text": "no type \u26a0\ufe0f",
  "created_at": "2025-11-21T14:39:15.000Z",
  "edited_at": null,
  "emojis": [],
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "reblogged": false,
  "favourited": false,
  "muted": false,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "card": null,
  "poll": null,
  "application": null,
  "language": null,
  "pinned": false,
  "bookmarked": false,
  "quote": null,
  "reactions": []
}

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://sharkey/users/afcj40xfmzy00003"
  ],
  "id": "http://pasture-one-actor/activity/huNsY7SqYZQ",
  "published": "2025-11-21T14:39:16Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://sharkey/users/afcj40xfmzy00003"
    ],
    "id": "http://pasture-one-actor/object/tDOMez7jjJk",
    "published": "2025-11-21T14:39:16Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context \u26a0\ufe0f ",
    "tag": [
      {
        "type": "Hashtag",
        "name": "#test"
      }
    ]
  }
}
sharkey
{
  "id": "afcj5usgjudd000m",
  "uri": "http://pasture-one-actor/object/tDOMez7jjJk",
  "url": "http://pasture-one-actor/object/tDOMez7jjJk",
  "account": {
    "id": "afcj5n5wjudd0004",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "fqn": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "created_at": "2025-11-21T14:39:06.116Z",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 17,
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "header": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "emojis": [],
    "moved": null,
    "fields": [],
    "bot": false,
    "discoverable": true,
    "noindex": false,
    "group": null,
    "suspended": false,
    "limited": false
  },
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "content": "<p>Hashtag not in <span>@context</span> \u26a0\ufe0f</p>",
  "content_type": "text/x.misskeymarkdown",
  "text": "Hashtag not in @context \u26a0\ufe0f",
  "created_at": "2025-11-21T14:39:16.000Z",
  "edited_at": null,
  "emojis": [],
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "reblogged": false,
  "favourited": false,
  "muted": false,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "media_attachments": [],
  "mentions": [],
  "tags": [
    {
      "name": "test",
      "url": "http://sharkey/tags/test"
    }
  ],
  "card": null,
  "poll": null,
  "application": null,
  "language": null,
  "pinned": false,
  "bookmarked": false,
  "quote": null,
  "reactions": []
}

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://sharkey/users/afcj40xfmzy00003"
  ],
  "id": "http://pasture-one-actor/activity/awU1e2SRIkM",
  "published": "2025-11-21T14:39:16Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://sharkey/users/afcj40xfmzy00003"
    ],
    "id": "http://pasture-one-actor/object/9yaaIH0wQ7w",
    "published": "2025-11-21T14:39:16Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context; as:Hashtag",
    "tag": [
      {
        "type": "as:Hashtag",
        "name": "#test"
      }
    ]
  }
}
sharkey
{
  "id": "afcj5usgjudd000n",
  "uri": "http://pasture-one-actor/object/9yaaIH0wQ7w",
  "url": "http://pasture-one-actor/object/9yaaIH0wQ7w",
  "account": {
    "id": "afcj5n5wjudd0004",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "fqn": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "created_at": "2025-11-21T14:39:06.116Z",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 18,
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "avatar_static": "https://dev.joinsharkey.org/static-assets/avatar.png",
    "header": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "header_static": "https://dev.joinsharkey.org/static-assets/transparent.png",
    "emojis": [],
    "moved": null,
    "fields": [],
    "bot": false,
    "discoverable": true,
    "noindex": false,
    "group": null,
    "suspended": false,
    "limited": false
  },
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "content": "<p>Hashtag not in <span>@context</span>; as:Hashtag</p>",
  "content_type": "text/x.misskeymarkdown",
  "text": "Hashtag not in @context; as:Hashtag",
  "created_at": "2025-11-21T14:39:16.000Z",
  "edited_at": null,
  "emojis": [],
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "reblogged": false,
  "favourited": false,
  "muted": false,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "card": null,
  "poll": null,
  "application": null,
  "language": null,
  "pinned": false,
  "bookmarked": false,
  "quote": null,
  "reactions": []
}