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",
  "id": "http://host.test/activities/_FKu8X5UCw25_fFO",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "content": "text",
    "id": "http://host.test/objects/JcUS1uJqqw4CMnbt",
    "published": "2025-12-23T10:32:31Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "cc": [],
    "tag": [
      {
        "type": "Mention",
        "href": "http://other.test/some/actor"
      }
    ],
    "type": "Note"
  },
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "content": "text",
  "id": "http://host.test/objects/JcUS1uJqqw4CMnbt",
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "tag": [
    {
      "type": "Mention",
      "href": "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",
  "id": "http://host.test/activities/dcp_h5K7gvFSU94p",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "content": "text",
    "id": "http://host.test/objects/fD4FEeQHMkvkJsQW",
    "published": "2025-12-23T10:32:31Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "cc": [],
    "tag": [
      {
        "type": "Mention",
        "href": "http://other.test/some/actor"
      }
    ],
    "type": "Note"
  },
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "content": "text",
  "id": "http://host.test/objects/fD4FEeQHMkvkJsQW",
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "tag": [
    {
      "type": "Mention",
      "href": "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",
  "id": "http://host.test/activities/3ck7KHX0fO5RPsc1",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "content": "text",
    "id": "http://host.test/objects/J6JcXT6w0IuxFbMz",
    "published": "2025-12-23T10:32:31Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "cc": [],
    "tag": [
      {
        "type": "Mention",
        "href": "http://other.test/some/actor"
      }
    ],
    "type": "Note"
  },
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "content": "text",
  "id": "http://host.test/objects/J6JcXT6w0IuxFbMz",
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "tag": [
    {
      "type": "Mention",
      "href": "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",
  "id": "http://host.test/activities/TOfQ8nuFvdxScWqg",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "content": "text",
    "id": "http://host.test/objects/rOsxB0PrAH88YTY0",
    "published": "2025-12-23T10:32:31Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "cc": [],
    "tag": [
      {
        "type": "Mention",
        "href": "http://other.test/some/actor"
      }
    ],
    "type": "Note"
  },
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "content": "text",
  "id": "http://host.test/objects/rOsxB0PrAH88YTY0",
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "tag": [
    {
      "type": "Mention",
      "href": "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",
  "id": "http://host.test/activities/7BFD85scjSOPDcDp",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "content": "text",
    "id": "http://host.test/objects/qWA_m5rdGsdGck-3",
    "published": "2025-12-23T10:32:31Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "cc": [],
    "tag": [
      {
        "type": "Mention",
        "href": "http://other.test/some/actor"
      }
    ],
    "type": "Note"
  },
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "content": "text",
  "id": "http://host.test/objects/qWA_m5rdGsdGck-3",
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "tag": [
    {
      "type": "Mention",
      "href": "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",
  "id": "http://host.test/activities/uHbgNodj2Mvu9FRq",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "content": "text",
    "id": "http://host.test/objects/92IgWaH4PJFw274L",
    "published": "2025-12-23T10:32:31Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "cc": [],
    "tag": [
      {
        "type": "Mention",
        "href": "http://other.test/some/actor"
      }
    ],
    "type": "Note"
  },
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "content": "text",
  "id": "http://host.test/objects/92IgWaH4PJFw274L",
  "published": "2025-12-23T10:32:31Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "cc": [],
  "tag": [
    {
      "type": "Mention",
      "href": "http://other.test/some/actor"
    }
  ],
  "type": "Note"
}