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.

Support table

X tag akkoma gotosocial hollo mastodon mitra pleroma sharkey
# #test test test test test test test
# #test
using as:Hashtag
# #test
no type ⚠️
test
# #test
Hashtag not in @context ⚠️
test test test test test test
# #test
Hashtag not in @context; as:Hashtag

Details

tag tags Example
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://akkoma/tag/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “name”: “#test”
  }
]
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://akkoma/tag/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
tag tags Example
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://gotosocial/tags/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “name”: “#test”
  }
]
[]
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://gotosocial/tags/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
tag tags Example
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “name”: “#test”
  }
]
[]
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
tag tags Example
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://mastodon/tags/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “name”: “#test”
  }
]
[]
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://mastodon/tags/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
tag tags Example
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://mitra/collections/tags/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://mitra/collections/tags/test”
  }
]
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://mitra/collections/tags/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
tag tags Example
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://pleroma/tag/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “name”: “#test”
  }
]
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://pleroma/tag/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
tag tags Example
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://sharkey/tags/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]
[
  {
    “name”: “#test”
  }
]
[]
[
  {
    “type”: “Hashtag”,
    “name”: “#test”
  }
]
[
  {
    “name”: “test”,
    “url”: “http://sharkey/tags/test”
  }
]
[
  {
    “type”: “as:Hashtag”,
    “name”: “#test”
  }
]
[]