A small tool to view real-world ActivityPub objects as JSON! Enter a URL
or username from Mastodon or a similar service below, and we'll send a
request with
the right
Accept
header
to the server to view the underlying object.
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
{
"Hashtag": "as:Hashtag",
"sensitive": "as:sensitive",
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"alsoKnownAs": {
"@id": "as:alsoKnownAs",
"@type": "@id"
},
"movedTo": {
"@id": "as:movedTo",
"@type": "@id"
},
"toot": "http://joinmastodon.org/ns#",
"featured": {
"@id": "toot:featured",
"@type": "@id"
},
"Emoji": "toot:Emoji",
"blurhash": "toot:blurhash",
"votersCount": "toot:votersCount",
"schema": "http://schema.org#",
"PropertyValue": "schema:PropertyValue",
"value": "schema:value",
"ostatus": "http://ostatus.org#",
"conversation": "ostatus:conversation"
}
],
"actor": "https://hexa.ninja",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://hexa.ninja/followers",
"https://microwords.goodevilgenius.org",
"https://fediverse.one/profile/fediverseobserver"
],
"id": "https://hexa.ninja/o/e8f2a1f25a6e4c1a9573996fb556f90f/activity",
"object": {
"type": "Note",
"id": "https://hexa.ninja/o/e8f2a1f25a6e4c1a9573996fb556f90f",
"attributedTo": "https://hexa.ninja",
"content": "<p><span class=\"h-card\"><a href=\"https://microwords.goodevilgenius.org/\" class=\"u-url mention\">@danjones000@microwords.goodevilgenius.org</a></span> Hey!</p>\n<p>This is an upcoming feature, it's not documented yet because I might make breaking changes before it gets "stable".</p>\n<p>If you want to try it anyway, yes you can create a file at <code>data/stream.py</code>, and here is an example:</p>\n<div class=\"highlight\"><pre><span></span><span class=\"kn\">from</span> <span class=\"nn\">loguru</span> <span class=\"kn\">import</span> <span class=\"n\">logger</span>\n\n<span class=\"kn\">from</span> <span class=\"nn\">app.customization</span> <span class=\"kn\">import</span> <span class=\"n\">ObjectInfo</span>\n<span class=\"kn\">from</span> <span class=\"nn\">app.customization</span> <span class=\"kn\">import</span> <span class=\"n\">default_stream_visibility_callback</span>\n\n\n<span class=\"k\">def</span> <span class=\"nf\">custom_stream_visibility_callback</span><span class=\"p\">(</span><span class=\"n\">object_info</span><span class=\"p\">:</span> <span class=\"n\">ObjectInfo</span><span class=\"p\">)</span> <span class=\"o\">-></span> <span class=\"nb\">bool</span><span class=\"p\">:</span>\n <span class=\"n\">logger</span><span class=\"o\">.</span><span class=\"n\">info</span><span class=\"p\">(</span><span class=\"s2\">"Custom"</span><span class=\"p\">)</span>\n <span class=\"k\">if</span> <span class=\"n\">object_info</span><span class=\"o\">.</span><span class=\"n\">actor_handle</span> <span class=\"o\">==</span> <span class=\"s2\">"@fediverseobserver@fediverse.one"</span><span class=\"p\">:</span>\n <span class=\"k\">if</span> <span class=\"s2\">"#microblogpub"</span> <span class=\"ow\">in</span> <span class=\"n\">object_info</span><span class=\"o\">.</span><span class=\"n\">hashtags</span><span class=\"p\">:</span>\n <span class=\"k\">return</span> <span class=\"kc\">True</span>\n <span class=\"k\">return</span> <span class=\"kc\">False</span>\n\n <span class=\"k\">return</span> <span class=\"n\">default_stream_visibility_callback</span><span class=\"p\">(</span><span class=\"n\">object_info</span><span class=\"p\">)</span>\n</pre></div>\n\n<p>(but check for breaking changes when you update)</p>\n",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://hexa.ninja/followers",
"https://microwords.goodevilgenius.org",
"https://fediverse.one/profile/fediverseobserver"
],
"published": "2023-01-06T19:22:33Z",
"context": "https://microwords.goodevilgenius.org/contexts/5e3a751e05a9451f8729887ec37f7f75",
"conversation": "https://microwords.goodevilgenius.org/contexts/5e3a751e05a9451f8729887ec37f7f75",
"url": "https://hexa.ninja/o/e8f2a1f25a6e4c1a9573996fb556f90f",
"tag": [
{
"type": "Mention",
"href": "https://microwords.goodevilgenius.org",
"name": "@danjones000@microwords.goodevilgenius.org"
}
],
"summary": null,
"inReplyTo": "https://microwords.goodevilgenius.org/o/c6cdc6ae299b41649fe7dbefbb45d941",
"sensitive": false,
"attachment": []
},
"published": "2023-01-06T19:22:33Z",
"type": "Create"
}