Collecting JSON-LD WebID examples

There have been a number of great example of what WebID could look like in
JSON-LD

I've started the process of collecting them here:

https://github.com/webidcg/webid-context/issues/2

Please add any examples or use cases either on this thread or in the github
issue, and we can try and create a documentation of possible approaches

First 3 from Aaron, reproduced here for convenience:

Example 1

A JSON-LD WebID document might look like this

{
    "@context": [
      "https://home.apache.org/~acoburn/context/webid.json"
    ],
    "id": "https://id.example/acoburn#i",
    "type": ["Person"],
    "name": "Aaron Coburn",
    "primaryTopicOf": {
      "id": "https://id.example/acoburn",
      "type": ["PersonalProfileDocument"]
    }
}

Example 2

One could also reverse the Information Resource -- WebID relationship

{
    "@context": [
      "https://home.apache.org/~acoburn/context/webid.json"
    ],
    "id": "https://id.example/acoburn",
    "type": ["PersonalProfileDocument"],
    "primaryTopic": {
        "id": "https://id.example/acoburn#i",
        "type": ["Person"],
        "name": "Aaron Coburn"
    }
}

Example 3

If you want to layer another system -- say, for example, Solid -- on top of
this, it is easy with a separate context

{
    "@context": [
      "https://home.apache.org/~acoburn/context/webid.json",
      "https://home.apache.org/~acoburn/context/solid.json"
    ],
    "id": "https://id.example/acoburn#i",
    "type": ["Person"],
    "name": "Aaron Coburn",
    "storage": ["https://solid.example/1", "https://solid.example/2"],
    "oidcIssuer": ["https://idp.example"],
    "primaryTopicOf": {
      "id": "https://id.example/acoburn",
      "type": ["PersonalProfileDocument"]
    }
}

Received on Thursday, 27 January 2022 11:17:05 UTC