- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Wed, 8 Nov 2023 16:28:18 +0100
- To: public-webid <public-webid@w3.org>
- Message-ID: <CAKaEYh+7yONFtXJNZ13gDYZbmS7vq7g2i2tbHUQ2McVDf0czVQ@mail.gmail.com>
I've made a stab at the WebID JSON-LD spec.
The main question I have is whether to use primaryTopic, with a nested
object. Or to use isPrimaryTopicOf : "", which I believe would allow one
object. This latter simplification will be useful elsewhere, so I'm
leaning towards it. But I'm unsure whether or not there are any gotchas
related to this design decision.
https://gist.github.com/melvincarvalho/a20ea21b5dbe86ad4f4e6235282c2da2
WebID-JSON-LD Specification
Author: Melvin Carvalho
Abstract
The WebID-JSON-LD specification extends the WebID protocol to include
JSON-LD formatted RDF responses, providing a structured, decentralized
method for identity discovery via a JSON-based data format.
Table of Contents
Introduction
Terminology
WebID-JSON-LD Definition
Implementation Guidelines
Security Considerations
Acknowledgments
1. Introduction
The WebID-JSON-LD specification is an integral part of the WebID identity
protocol suite, focusing specifically on the use of JSON-LD to enable the
identification of webid:Agent entities in a manner that is both easily
parseable and consistent with the principles of linked data.
2. Terminology
WebID: A URI that dereferences to an RDF document, which asserts the
identity of a webid:Agent.
webid:Agent: An identifiable entity authenticated through a WebID.
JSON-LD: JavaScript Object Notation for Linked Data, a method of
encoding linked data using JSON.
RDF: Resource Description Framework, a specification for data
interchange on the web.
3. WebID-JSON-LD Definition
A WebID-JSON-LD is a specific type of WebID which, when dereferenced,
returns an RDF document formatted as JSON-LD. This document affirms that
the URI identifies an entity of type webid:Agent.
Example of a JSON-LD response:
{
"@context": "https://w3id.org/webid",
"@id": "#me",
"@type": "webid:Agent"
}
4. Implementation Guidelines
To implement a WebID-JSON-LD, one must provide a URI that resolves to an
RDF document in JSON-LD format, asserting the URI's relation to a
webid:Agent. The response must correctly employ content negotiation to
serve the JSON-LD format upon request.
Example of an HTTP request for a JSON-LD formatted WebID:
GET /#me HTTP/1.1
Host: example.org
Accept: application/ld+json
Note that the WebID could be .json, .jsonld or a structured data island in
.html
5. Security Considerations
The implementation of WebID-JSON-LD should follow the security guidelines
outlined in the broader WebID specification, with additional attention to
the parsing and serialization of JSON data to prevent injection attacks.
6. Acknowledgments
Gratitude is extended to the WebID community and the JSON-LD working group
for their insights and discussions that have contributed to this
sub-specification.
Notes
WebID-JSON-LD is part of an open-ended series of sub-specifications under
the WebID protocol, designed for adaptability and extensibility to
incorporate various RDF formats, fostering a robust and decentralized
identity verification system on the web.
Received on Wednesday, 8 November 2023 15:28:36 UTC