Options
All
  • Public
  • Public/Protected
  • All
Menu

Used to express an ordered set of data. A List object is reified to a Subject (unlike in JSON-LD) and so it has an @id, which can be set by the user.

Examples:


A priority list of preferences

The second subject in this array shows how the first subject (the List) can be referenced by another subject. When inserting data it might be more readable to simply nest the list under the interests property in the outer subject, fred.

[{
  "@id": "fredInterests",
  "@list": ["Lounging", "Bowling", "Pool", "Golf", "Poker"]
}, {
  "@id": "fred",
  "interests": { "@id": "fredInterests" }
}]

A chronology of referenced subjects

{
  "@id": "fredAppearsIn",
  "@list": [
    { "@type": "Episode", "name": "The Flintstone Flyer" },
    { "@type": "Episode", "name": "Hot Lips Hannigan" },
    { "@type": "Episode", "name": "The Swimming Pool" }
  ]
}

🚧 This engine does not support use of the @list keyword in a JSON-LD Context term definition.

see

m-ld Lists specification

see

json-rql list

Hierarchy

Indexable

[key: string]: SubjectPropertyObject | Context | undefined

Specifies a graph edge, that is, a mapping from the @id of this subject to a set of one or more values.

Examples:


A priority list of preferences

The second subject in this array shows how the first subject (the List) can be referenced by another subject. When inserting data it might be more readable to simply nest the list under the interests property in the outer subject, fred.

[{
  "@id": "fredInterests",
  "@list": ["Lounging", "Bowling", "Pool", "Golf", "Poker"]
}, {
  "@id": "fred",
  "interests": { "@id": "fredInterests" }
}]

A chronology of referenced subjects

{
  "@id": "fredAppearsIn",
  "@list": [
    { "@type": "Episode", "name": "The Flintstone Flyer" },
    { "@type": "Episode", "name": "Hot Lips Hannigan" },
    { "@type": "Episode", "name": "The Swimming Pool" }
  ]
}

🚧 This engine does not support use of the @list keyword in a JSON-LD Context term definition.

see

m-ld Lists specification

see

json-rql list

Index

Properties

Properties

Optional @context

@context: Context

A JSON-LD Context for the query. In an API, this will frequently be implicit. For example, using json-rql as the body of a POST to http://example.com/my-api/v1/person/query might have the implicit context of a Person (possibly found at http://example.com/my-api/v1/person).

see

examples

Optional @id

@id: Iri | Variable

The unique identity of the subject in the domain.

🚧 Subjects strictly need not be identified with an @id, but the data of such Subjects cannot be retrieved with a simple Describe query.

@list

@list: SubjectPropertyObject[] | {}

An array or indexed-object representation of the list contents. Each "item" in the list can be any of the normal subject property objects, such as strings, numbers, booleans or References to other subjects.

The indexed-object notation is used to insert or delete items at a specific list index, expressed as a number or numeric string. For more explanation, see the m-ld Lists specification.

Optional @type

@type: Iri | Variable | Iri[] | Variable[]

The type of the subject, as an IRI or set of IRIs. (@type is actually shorthand for the RDF property rdf:type.)

Legend

  • Property
  • Method
  • Constructor

Generated using TypeDoc. Delivered by Vercel. @m-ld/m-ld - v0.7.0 Source code licensed MIT. Privacy policy