Skip to content

JSON-LD @context

Various examples the @context property can take. See here for the W3C specification, and here for what ActivityStreams says about it.

Support Table Preview

@context Object Activity
“https://www.w3.org/ns/activitystreams”
Object Activity
[
  “https://www.w3.org/ns/activitystreams”
]
Object Activity
[
  “https://www.w3.org/ns/activitystreams”,
  {
    “Hashtag”: “as:Hashtag”
  }
]
Object Activity
[
  “https://www.w3.org/ns/activitystreams”,
  “https://w3id.org/fep/5711”
]
Object Activity
null
Object Activity
“http://strange.example/context”
Object Activity

Objects

Object 1

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "attributedTo": "http://actor.example",
  "content": "@context url as the ActivityStreams URL",
  "id": "http://actor.example/object/dngglxbUAwE",
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "type": "Note"
}

Object 2

{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://actor.example",
  "content": "@context url is list of ActivityStreams URL",
  "id": "http://actor.example/object/6ImG_Ba9Zrs",
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "type": "Note"
}

Object 3

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag"
    }
  ],
  "attributedTo": "http://actor.example",
  "content": "@context url is list of ActivityStreams URL and Hashtag",
  "id": "http://actor.example/object/AC1MnMc66Dc",
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "type": "Note"
}

Object 4

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/fep/5711"
  ],
  "attributedTo": "http://actor.example",
  "content": "@context with ActivityStreams URL + w3id-fep document",
  "id": "http://actor.example/object/TiTZj7xsb6A",
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "type": "Note"
}

Object 5

{
  "@context": null,
  "attributedTo": "http://actor.example",
  "content": "no @context",
  "id": "http://actor.example/object/lHdDK55QJc4",
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "type": "Note"
}

Object 6

{
  "@context": "http://strange.example/context",
  "attributedTo": "http://actor.example",
  "content": "@context is a broken url",
  "id": "http://actor.example/object/X2OZO8rtEC8",
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "type": "Note"
}

Activities

Activity 1

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "actor": "http://actor.example",
  "id": "http://actor.example/activity/rjgxlXDcAIQ",
  "object": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "attributedTo": "http://actor.example",
    "content": "@context url as the ActivityStreams URL",
    "id": "http://actor.example/object/kE6BB3YSyi8",
    "published": "2025-10-04T11:50:25Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 2

{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/activity/B5h7fE83Vmw",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://actor.example",
    "content": "@context url is list of ActivityStreams URL",
    "id": "http://actor.example/object/GAGUztcnZA8",
    "published": "2025-10-04T11:50:25Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 3

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag"
    }
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/activity/7Sbk6LCPR6w",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      {
        "Hashtag": "as:Hashtag"
      }
    ],
    "attributedTo": "http://actor.example",
    "content": "@context url is list of ActivityStreams URL and Hashtag",
    "id": "http://actor.example/object/BLhmPROeRVs",
    "published": "2025-10-04T11:50:25Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 4

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/fep/5711"
  ],
  "actor": "http://actor.example",
  "id": "http://actor.example/activity/aXhUddPq3G0",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      "https://w3id.org/fep/5711"
    ],
    "attributedTo": "http://actor.example",
    "content": "@context with ActivityStreams URL + w3id-fep document",
    "id": "http://actor.example/object/K5fCGJheHk8",
    "published": "2025-10-04T11:50:25Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 5

{
  "@context": null,
  "actor": "http://actor.example",
  "id": "http://actor.example/activity/LdcLWNp3M7E",
  "object": {
    "@context": null,
    "attributedTo": "http://actor.example",
    "content": "no @context",
    "id": "http://actor.example/object/VezDB1v_524",
    "published": "2025-10-04T11:50:25Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://remote.example/"
  ],
  "type": "Create"
}

Activity 6

{
  "@context": "http://strange.example/context",
  "actor": "http://actor.example",
  "id": "http://actor.example/activity/Z1sfp1h8lBY",
  "object": {
    "@context": "http://strange.example/context",
    "attributedTo": "http://actor.example",
    "content": "@context is a broken url",
    "id": "http://actor.example/object/c6ZrtLQkX4U",
    "published": "2025-10-04T11:50:25Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-10-04T11:50:25Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://remote.example/"
  ],
  "type": "Create"
}