Open melvincarvalho opened 2 years ago
## JSON-LD Start ##
{
"@context": {
"name": {
"@id": "http://schema.org/name",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
},
"sameAs": {
"@id": "http://www.w3.org/2002/07/owl#sameAs",
"@type": "@id"
},
"description": {
"@id": "http://schema.org/description",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
},
"mainEntityOfpage": {
"@id": "http://schema.org/mainEntityOfpage",
"@type": "@id"
},
"mainEntity": {
"@id": "http://schema.org/mainEntity",
"@type": "@id"
},
"title": {
"@id": "http://schema.org/title",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
}
},
"@graph": [{
"@id": "https://lists.w3.org/Archives/Public/public-webid/2022Jan/0115.html#netid",
"@type": "http://schema.org/Person",
"sameAs": [
"https://twitter.com/kidehen#netid",
"https://linkedin.com/in/kidehen#netid"
],
"name": {
"@value": "Kingsley Uyi Idehen",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
},
"description": {
"@value": "A document about me",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
},
"mainEntityOfpage": {
"@id": "https://lists.w3.org/Archives/Public/public-webid/2022Jan/0115.html#doc",
"@type": "http://schema.org/WebPage",
"mainEntity": "https://lists.w3.org/Archives/Public/public-webid/2022Jan/0115.html#netid",
"title": {
"@value": "A Personal Profile Document",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
}
}
}]
}
## JSON-LD End ##
Here's a rendition using Relative HTTP URIs from JSON-LD. Note, this is only now feasible due to fixes in JSON-LD 1.1.
## JSON-LD Start ##
{
"@context": {
"@base": "",
"name": {
"@id": "http://schema.org/name",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
},
"sameAs": {
"@id": "http://www.w3.org/2002/07/owl#sameAs",
"@type": "@id"
},
"description": {
"@id": "http://schema.org/description",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
},
"mainEntityOfpage": {
"@id": "http://schema.org/mainEntityOfpage",
"@type": "@id"
},
"mainEntity": {
"@id": "http://schema.org/mainEntity",
"@type": "@id"
},
"title": {
"@id": "http://schema.org/title",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
}
},
"@graph": [
{
"@id": "#netid",
"@type": "http://schema.org/Person",
"sameAs": [
"https://twitter.com/kidehen#netid",
"https://linkedin.com/in/kidehen#netid"
],
"name": {
"@value": "Kingsley Uyi Idehen",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
},
"description": {
"@value": "A document about me",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
},
"mainEntityOfpage": {
"@id": "doc",
"@type": "http://schema.org/WebPage",
"mainEntity": "#netid",
"title": {
"@value": "A Personal Profile Document",
"@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
}
}
}
]
}
## JSON-LD End ##
3 great WebID JSON-LD examples were described on the mailing list by @acoburn
Example 1
A JSON-LD WebID document might look like this
Example 2
One could also reverse the Information Resource -- WebID relationship
Example 3
If you want to layer another system -- say, for example, Solid -- on top of this, it is easy with a separate context
Using this issue as a place holder to collect this and other JSON examples of what a WebID might look like. It can then be added somewhere to the repo documentation