Skip to content

Varying the value of the @context property

Example 1: list of AP context

Activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/2_w3-a8_sb_Zd9gx",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "text",
    "id": "http://host.test/objects/Y35P4csy1CNBP0Gh",
    "published": "2026-04-08T07:53:32Z",
    "tag": [
      {
        "href": "http://other.test/some/actor",
        "type": "Mention"
      }
    ],
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Note"
  },
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "text",
  "id": "http://host.test/objects/Y35P4csy1CNBP0Gh",
  "published": "2026-04-08T07:53:32Z",
  "tag": [
    {
      "href": "http://other.test/some/actor",
      "type": "Mention"
    }
  ],
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Note"
}

Example 2: AP context

Activity
{
  "@context": "https://www.w3.org/ns/activitystreams",
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/0a78IYBNs5l58E1r",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "text",
    "id": "http://host.test/objects/OUd3x1wswDFbw6Km",
    "published": "2026-04-08T07:53:32Z",
    "tag": [
      {
        "href": "http://other.test/some/actor",
        "type": "Mention"
      }
    ],
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Note"
  },
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "text",
  "id": "http://host.test/objects/OUd3x1wswDFbw6Km",
  "published": "2026-04-08T07:53:32Z",
  "tag": [
    {
      "href": "http://other.test/some/actor",
      "type": "Mention"
    }
  ],
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Note"
}

Example 3: list of AP context and dictionary

Activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag"
    }
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/25xRSJC2NM-S6sAG",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "text",
    "id": "http://host.test/objects/2JaKkIeucbRy7OhH",
    "published": "2026-04-08T07:53:32Z",
    "tag": [
      {
        "href": "http://other.test/some/actor",
        "type": "Mention"
      }
    ],
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Note"
  },
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "text",
  "id": "http://host.test/objects/2JaKkIeucbRy7OhH",
  "published": "2026-04-08T07:53:32Z",
  "tag": [
    {
      "href": "http://other.test/some/actor",
      "type": "Mention"
    }
  ],
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Note"
}

Example 4: list of dictionary and AP context

Activity
{
  "@context": [
    {
      "Hashtag": "as:Hashtag"
    },
    "https://www.w3.org/ns/activitystreams"
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/7VZxYZEwvU3Pv7nG",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "text",
    "id": "http://host.test/objects/ODu7O6xYt9hnhTot",
    "published": "2026-04-08T07:53:32Z",
    "tag": [
      {
        "href": "http://other.test/some/actor",
        "type": "Mention"
      }
    ],
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Note"
  },
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "text",
  "id": "http://host.test/objects/ODu7O6xYt9hnhTot",
  "published": "2026-04-08T07:53:32Z",
  "tag": [
    {
      "href": "http://other.test/some/actor",
      "type": "Mention"
    }
  ],
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Note"
}

Example 5: list of AP context and other url

Activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/data-integrity/v2"
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/tJWeSz1fh0MeUV5M",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "text",
    "id": "http://host.test/objects/WuflpK-0rTBsO6kE",
    "published": "2026-04-08T07:53:32Z",
    "tag": [
      {
        "href": "http://other.test/some/actor",
        "type": "Mention"
      }
    ],
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Note"
  },
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "text",
  "id": "http://host.test/objects/WuflpK-0rTBsO6kE",
  "published": "2026-04-08T07:53:32Z",
  "tag": [
    {
      "href": "http://other.test/some/actor",
      "type": "Mention"
    }
  ],
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Note"
}

Example 6: list of other url and AP context

Activity
{
  "@context": [
    "https://w3id.org/security/data-integrity/v2",
    "https://www.w3.org/ns/activitystreams"
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/7RSqb7VfhXFzCi6d",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "text",
    "id": "http://host.test/objects/EQois6bJt_z6lZ6L",
    "published": "2026-04-08T07:53:32Z",
    "tag": [
      {
        "href": "http://other.test/some/actor",
        "type": "Mention"
      }
    ],
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Note"
  },
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "text",
  "id": "http://host.test/objects/EQois6bJt_z6lZ6L",
  "published": "2026-04-08T07:53:32Z",
  "tag": [
    {
      "href": "http://other.test/some/actor",
      "type": "Mention"
    }
  ],
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Note"
}