eclipse-dataspace-protocol-base / DataspaceProtocol

The Dataspace Protocol is a set of specifications designed to facilitate interoperable data sharing between entities governed by usage control and based on Web technologies. These specifications define the schemas and protocols required for entities to publish data, negotiate Agreements, and access data in a data space
https://eclipse-dataspace-protocol-base.github.io/DataspaceProtocol/
Apache License 2.0
9 stars 4 forks source link

Proposal: Adopt JSON Schema for normative serialization #25

Open jimmarino opened 2 months ago

jimmarino commented 2 months ago

Problem Statement

Currently, the DSP message is very open-ended, which imposes significant complexity and impedes interoperability. For example, the specification does not normatively use a schema technology to define message types. Instead, it includes JSON Schema and Turtle files. The specification, however, mandates messages to be in JSON-LD compact form. This forces implementations to perform JSON-LD processing and handle extensibility when not necessary.

Other specifications, such as the Verifiable Credentials Data Model v2.0 are taking a pragmatic approach to JSON-LD processing by defining data structures in such a way that it becomes optional. Specifically, if message extensibility is not required, an implementation does not need to perform JSON-LD processing to handle messages.

Solution

I propose we define all messages normatively using JSON Schema and make JSON-LD processing optional. This involves:

  1. Adjusting the specification to refer to JSON Schema definitions normatively
  2. Removing Turtle files
  3. Require JSON-LD contexts to be defined such that non-JSON-LD aware parsers can process compacted messages. For example, contexts remove the use of prefixes for terms.

This issue will serve as a basis to further profile ODRL and DCAT.