This document attempts to gather requirements for Linked Data in JSON (JSON-LD) in order to create an objective measure with which to evaluate the JSON-LD Specification.

This document is an experimental work in progress.

Introduction

Definitions

JSON
JSON (JavaScript Object Notation) [[!RFC4627]] is a simple way to express objects in a syntax compatible with JavaScript.
Linked Data
Linked Data is a term used to describe data relationships through interconnected documents. The basic tenets are described in the [[LINKED-DATA]] design note by Tim Berners-Lee:
  1. Use URIs as names for things

  2. Use HTTP URIs so that people can look up those names.

  3. When someone looks up a URI, provide useful information.

  4. Include links to other URIs so that they can discover more things.

Structured Data
Structured Data describes general means of describing inter-relationships between entities in a way that can be described using a graph or tree structure. JSON is an example of a grammar for describing Structured Data. In the context of JSON-LD, Structured Data refers to JSON objects in which the subject may not have an IRI, or where the IRI is not dereferencable, or does not retrieve a representation of the object to which it refers.
JSON Object
From [[RFC4627]]:
An object structure is represented as a pair of curly brackets surrounding zero or more name/value pairs (or members). A name is a string. A single colon comes after each name, separating the name from the value. A single comma separates a value from a following name. The names within an object SHOULD be unique.

Requirements

Linked Data

The following are taken to be assertions about the meaning of Linked Data.

This section is intended to abstractly describe the concept of Linked Data. This does not necessarily relate concepts directly to a JSON syntactic expression; that is left for the following section.

  1. Linked Data is a set of documents, each containing a representation of a linked data graph.
  2. A linked data graph is an unordered labeled directed graph, where nodes are subjects or objects, and edges are properties.
  3. A subject is any node in a linked data graph with at least one outgoing edge.
  4. A subject SHOULD be labeled with an IRI.
  5. A property is an edge of the linked data graph.
  6. A property SHOULD be labeled with an IRI.
  7. An object is a node in a linked data graph with at least one incoming edge.
  8. An object MAY be labeled with an IRI.
  9. An IRI that is a label in a linked data graph SHOULD be dereferencable to a Linked Data document describing the labeled subject, object or property.
  10. A literal is an object with a label that is not an IRI

Structured Data

Definitions for Linked Data are often stricter than is required for many applications, where it is not feasible or desirable to identify every object with an IRI which resolves to a Linked Data representation of the IRI used to reference it. In such cases, graphs may be described with unlabeled nodes, or nodes having non-dereferencable IRIs.

Structured Data is described as a super-set of Linked Data in which subject or object nodes are not labeled with a dereferencable IRI. The concept of a linked data graph is extended to include nodes in which nodes are not labeled with dereferencable IRIs.

JSON-LD

The following are taken to be requirements and principles for creating Linked Data in JSON.

  1. A JSON-LD document MUST be able to express a linked data graph.
  2. A JSON-LD document MUST be a valid JSON document.
  3. All JSON constructs MUST have semantic meaning in a JSON-LD document: JSON objects, arrays, numbers, strings and the literal names false, and true.
  4. A subject is defined using a designated name/value pair of a JSON object.
  5. There MUST be a way to label a JSON object with an IRI.
  6. There MAY be a way to reference an un-labeled JSON object that does not have a direct child relationship.
  7. JSON object name/value SHOULD be used to describe property-object relationships.
  8. A property SHOULD resolve to an absolute IRI.
  9. Un-coerced strings represent literal objects.
  10. Coerced strings MAY represent IRIs.
  11. There SHOULD be a way to associate a datatype IRI with a literal JSON value.
  12. JSON boolean and numbers values represent specific datatyped literals.
  13. The literal value of JSON null is undefined.
  14. A JSON array MAY be used to associate multiple objects with a subject through a common property.
  15. Without explicit syntactic support, JSON arrays MUST NOT be interpreted as defining an object ordering.
  16. A JSON-LD document SHOULD be able to express an ordered list of objects.