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:

Use URIs as names for things

Use HTTPURIs so that
people can look up those names.

When someone looks up a URI, provide useful information.

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.

Linked Data is a set of documents, each containing a representation of a linked data graph.

A linked data graph is an unordered labeled directed graph, where nodes are subjects or objects, and edges are properties.

A subject is any node in a linked data graph with at least one outgoing edge.

A subject SHOULD be labeled with an IRI.

A property is an edge of the linked data graph.

A property SHOULD be labeled with an IRI.

An object is a node in a linked data graph with at least one incoming edge.

An object MAY be labeled with an IRI.

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.

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.

A JSON-LD document MUST be able to express a linked data graph.

A JSON-LD document MUST be a valid JSON document.

All JSON constructs MUST have semantic meaning in a
JSON-LD document: JSON objects, arrays, numbers, strings and the literal
names false, and true.

A subject is defined using a designated name/value pair of a JSON object.

There MUST be a way to label a JSON object with an IRI.

There MAY be a way to reference an un-labeled JSON object that does not have a direct child relationship.

JSON object name/value SHOULD be used to describe property-object relationships.

A property SHOULD resolve to an absolute IRI.

Un-coerced strings represent literal objects.

Coerced strings MAY represent IRIs.

There SHOULD be a way to associate a datatype IRI with a literal JSON value.