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/Eb8V6zsFzEA",
  "published": "2025-09-09T09:32:39Z",
  "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/MIdzcI7hLBw",
  "published": "2025-09-09T09:32:39Z",
  "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/rqdsiN80dgU",
  "published": "2025-09-09T09:32:39Z",
  "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/CTb_z2v4b2c",
  "published": "2025-09-09T09:32:39Z",
  "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/gjsiaKQFyDg",
  "published": "2025-09-09T09:32:39Z",
  "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/BS7VTyh8ZkY",
  "published": "2025-09-09T09:32:39Z",
  "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/25kdpi9GyTg",
  "object": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "attributedTo": "http://actor.example",
    "content": "@context url as the ActivityStreams URL",
    "id": "http://actor.example/object/rfhvAyF04Ak",
    "published": "2025-09-09T09:32:39Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-09-09T09:32:39Z",
  "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/oLQW1Jl-Aok",
  "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/35_-ikqiJQM",
    "published": "2025-09-09T09:32:39Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-09-09T09:32:39Z",
  "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/9C_q0SCcuXs",
  "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/0vg8x_dw1Fc",
    "published": "2025-09-09T09:32:39Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-09-09T09:32:39Z",
  "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/kDCEhedfMOg",
  "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/rvPj8KfW5tY",
    "published": "2025-09-09T09:32:39Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-09-09T09:32:39Z",
  "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/EEiDLBj9WKM",
  "object": {
    "@context": null,
    "attributedTo": "http://actor.example",
    "content": "no @context",
    "id": "http://actor.example/object/3MFg3Fn41U8",
    "published": "2025-09-09T09:32:39Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-09-09T09:32:39Z",
  "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/AVnRnijCN4w",
  "object": {
    "@context": "http://strange.example/context",
    "attributedTo": "http://actor.example",
    "content": "@context is a broken url",
    "id": "http://actor.example/object/i0QU9Izldd0",
    "published": "2025-09-09T09:32:39Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://remote.example/"
    ],
    "type": "Note"
  },
  "published": "2025-09-09T09:32:39Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://remote.example/"
  ],
  "type": "Create"
}