Views: 1
JSON Linking Language (JSON Link) Version 1.0
This specification defines the JSON Linking Language (JSON Link) Version 1.0, which allows elements to be inserted into JSON documents in order to create and describe links between resources. It uses JSON-LD syntax to create structures that can describe links similar to the simple unidirectional hyperlinks of today’s HTML, as well as more sophisticated links.
Table of Contents
- Introduction
- JSON Link Concepts
2.1. Links and Resources
2.2. Arcs, Traversal, and Behavior
2.3. Resources in Relation to the Physical Location of a Linking Element - JSON Link Processing and Conformance
3.1. Processing Dependencies
3.2. Markup Conformance
3.3. Application Conformance
3.3.1. Full Conformance
3.3.2. Simple Conformance - JSON Link Markup Design
4.1. JSON Link Attribute Usage Patterns
4.2. JSON Link Element Type Relationships
4.3. Attribute Value Defaulting
4.4. Integrating JSON Link Usage with Other Markup
4.5. Using JSON Link with Legacy Markup - JSON Link Elements and Attributes
5.1. Extended Links (extended-Type Element)
5.1.1. Local Resources for an Extended Link (resource-Type Element)
5.1.2. Remote Resources for an Extended Link (locator-Type Element)
5.1.3. Traversal Rules for an Extended Link (arc-Type Element)
5.1.4. Titles for Extended Links, Locators, and Arcs (title-Type Element)
5.1.5. Locating Linkbases (Special Arc Role)
5.2. Simple Links (simple-Type Element)
5.3. JSON Link Element Type Attribute (type)
5.4. Locator Attribute (href)
5.5. Semantic Attributes (role, arcrole, and title)
5.6. Behavior Attributes (show and actuate)
5.6.1. show Attribute
5.6.2. actuate Attribute
5.7. Traversal Attributes (label, from, and to)
Appendices- References
A.1. Normative References
A.2. Non-Normative References - Sample JSON-LD (Non-Normative)
- Sample JSON Schema (Non-Normative)
- Changes from JSON Link 1.0 (Non-Normative)
- References
1. Introduction
This specification defines the JSON Linking Language (JSON Link), which allows elements to be inserted into JSON documents in order to create and describe links between resources.
JSON Link provides a framework for creating both basic unidirectional links and more complex linking structures. It allows JSON documents to:
- Assert linking relationships among more than two resources
- Associate metadata with a link
- Express links that reside in a location separate from the linked resources
An important application of JSON Link is in hypermedia systems that have hyperlinks. A simple case of a hyperlink is an HTML a
element, which has these characteristics:
- The hyperlink uses IRIs as its locator technology.
- The hyperlink is expressed at one of its two ends.
- The hyperlink identifies the other end (although a server may have great freedom in finding or dynamically creating that destination).
- Users can initiate traversal only from the end where the hyperlink is expressed to the other end.
- The hyperlink’s effect on windows, frames, go-back lists, style sheets in use, and so on is determined by user agents, not by the hyperlink itself. For example, traversal of
a
links normally replaces the current view, perhaps with a user option to open a new window.
This set of characteristics is powerful, but the model that underlies them limits the range of possible hyperlink functionality. The model defined in this specification shares with HTML the use of IRI technology, but goes beyond HTML in offering features, previously available only in dedicated hypermedia systems, that make hyperlinking more scalable and flexible. Along with providing linking data structures, JSON Link provides a minimal link behavior model; higher-level applications layered on JSON Link will often specify alternate or more sophisticated rendering and processing treatments.
Integrated treatment of specialized links used in other technical domains, such as foreign keys in relational databases and reference values in programming languages, is outside the scope of this specification.
For languages, such as [CSS], that wish to identify hypertext links in a document, we suggest that any local element from which JSON Link specifies that traversal is possible, and which the application treats as if it specified actuate="onRequest"
, be treated as a hyperlink source anchor.
2. JSON Link Concepts
This section describes the terms and concepts that are essential to understanding JSON Link, without discussing the syntax used to create JSON Link constructs. A few additional terms are introduced in later parts of this specification.
2.1. Links and Resources
[Definition: A JSON Link link is an explicit relationship between resources or portions of resources.] [Definition: It is made explicit by a JSON Link linking element, which is a JSON Link-conforming JSON element that asserts the existence of a link.] There are six JSON Link elements; only two of them are considered linking elements. The others provide various pieces of information that describe the characteristics of a link. (The term “link” as used in this specification refers only to a JSON Link link, though nothing prevents non-JSON Link constructs from serving as links.)
The notion of resources is universal to the World Wide Web. [Definition: As discussed in [RFC 3986], a resource is any addressable unit of information or service.] Examples include files, images, documents, programs, and query results. The means used for addressing a resource is an IRI (Internationalized Resource Identifier) reference (described more in 5.4 Locator Attribute (href)). It is possible to address a portion of a resource. For example, if the whole resource is a JSON document, a useful portion of that resource might be a particular element inside the document. Following a link to it might result, for example, in highlighting that element or scrolling to that point in the document.
[Definition: When a link associates a set of resources, those resources are said to participate in the link.] Even though JSON Link links must appear in JSON documents, they are able to associate all kinds of resources, not just JSON-encoded ones.
One of the common uses of JSON Link is to create hyperlinks. [Definition: A hyperlink is a link that is intended primarily for presentation to a human user.] Nothing in JSON Link’s design, however, prevents it from being used with links that are intended solely for consumption by computers.
2.2. Arcs, Traversal, and Behavior
[Definition: Using or following a link for any purpose is called traversal.] Even though some kinds of link can associate arbitrary numbers of resources, traversal always involves a pair of resources (or portions of them); [Definition: the source from which traversal is begun is the starting resource] and [Definition: the destination is the ending resource]. Note that the term “resource” used in this fashion may at times apply to a resource portion, not a whole resource.
[Definition: Information about how to traverse a pair of resources, including the direction of traversal and possibly application behavior information as well, is called an arc]. If two arcs in a link specify the same pair of resources, but they switch places as starting and ending resources, then the link is multidirectional, which is not the same as merely “going back” after traversing a link.
2.3. Resources in Relation to the Physical Location of a Linking Element
[Definition: A local resource is a JSON element that participates in a link by virtue of having as its parent, or being itself, a linking element]. [Definition: Any resource or resource portion that participates in a link by virtue of being addressed with an IRI reference is considered a remote resource, even if it is in the same JSON document as the link, or even inside the same linking element.] Put another way, a local resource is specified “by value,” and a remote resource is specified “by reference.”
[Definition: An arc that has a local starting resource and a remote ending resource goes outbound, that is, away from the linking element.] (Examples of links with such an arc are the HTML a
element, HyTime “clinks,” and Text Encoding Initiative xref
elements.) [Definition: If an arc’s ending resource is local but its starting resource is remote, then the arc goes inbound.] [Definition: If neither the starting resource nor the ending resource is local, then the arc is a third-party arc.] Though it is not required, any one link typically specifies only one kind of arc throughout, and thus might be referred to as an inbound, outbound, or third-party link.
To create a link that emanates from a resource to which you do not have (or choose not to exercise) write access, or from a resource that offers no way to embed linking constructs, it is necessary to use an inbound or third-party arc. When such arcs are used, the requirements for discovery of the link are greater than for outbound arcs. [Definition: Documents containing collections of inbound and third-party links are called link databases, or linkbases.]
3. JSON Link Processing and Conformance
This section details processing and conformance requirements on JSON Link applications and markup.
3.1. Processing Dependencies
JSON Link processing depends on [JSON], [JSON-LD], [RFC 3987], and [CharMod Fundamentals].
3.2. Markup Conformance
A JSON element conforms to JSON Link if:
- It has a type attribute from the JSON Link namespace whose value is one of “simple”, “extended”, “locator”, “arc”, “resource”, “title”, or “none”, and it adheres to the conformance constraints imposed by the chosen JSON Link element type, as prescribed in this specification, or
- It does not have a type attribute from the JSON Link namespace and it adheres to the conformance constraints imposed by the JSON Link simple element type, as prescribed in this specification.
- It does not have any attributes in the JSON Link namespace other than type, href, role, arcrole, title, show, actuate, label, from, and to.
Content conforming to JSON Link must conform to [CharMod Fundamentals].
This specification imposes no particular constraints on schemas; conformance applies only to elements and attributes.
3.3. Application Conformance
A JSON Link application is any software module that interprets well-formed JSON documents containing JSON Link elements and attributes, or JSON information sets [JIS] containing information items and properties corresponding to JSON Link elements and attributes. (This document refers to elements and attributes, but all specifications herein apply to their information set equivalents as well.)
JSON Link defines two conformance levels for a JSON Link application, simple and full.
3.3.1. Full Conformance
An application satisfies the constraints of full conformance if:
- It observes the mandatory conditions (“must”) for applications set forth in this specification, and
- For any recommended or optional conditions (“should” and “may”) it chooses to observe, it observes them in the way prescribed, and
- It performs markup conformance testing according to all the conformance constraints appearing in this specification.
- It applies JSON Link semantics only to those elements which satisfy the markup conformance criteria outlined in 3.2 Markup Conformance.
Applications implementing JSON Link must conform to [CharMod Fundamentals].
3.3.2. Simple Conformance
An application satisfies the constraints of simple conformance if it is fully conformant with respect to simple links. In other words:
- The processor may ignore any link which specifies an jsonlink:type other than “simple”.
- If the jsonlink:href attribute is specified and the jsonlink:type attribute is not specified, the element must be processed as if jsonlink:type specified “simple”.
- An application which claims simple conformance may ignore all other JSON Link elements.
4. JSON Link Markup Design
This section describes the design of JSON Link’s markup vocabulary.
Link markup needs to be recognized reliably by JSON Link applications in order to be traversed and handled properly. JSON Link uses the mechanism described in the Namespaces in JSON Recommendation [JSON Names] to accomplish recognition of the constructs in the JSON Link vocabulary.
The JSON Link namespace defined by this specification has the following URI:
http://www.w3.org/1999/jsonlink
As dictated by [JSON Names], the use of JSON Link elements and attributes requires declaration of the JSON Link namespace. For example, the following declaration would make the prefix jsonlink available within the myElement element to represent the JSON Link namespace:
{
"myElement": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "simple",
"jsonlink:href": "students.json",
"jsonlink:role": "http://www.example.com/linkprops/studentlist",
"jsonlink:title": "Student List",
"jsonlink:show": "new",
"jsonlink:actuate": "onRequest",
"text": "Current List of Students"
}
}
Note:
Most code examples in this specification do not show a JSON Link namespace declaration. The jsonlink prefix is used throughout to stand for the declaration of the JSON Link namespace on elements in whose scope the so-marked attribute appears (on the same element that bears the attribute or on some ancestor element), whether or not a JSON Link namespace declaration is present in the example.
JSON Link’s namespace provides global attributes for use on elements that are in any arbitrary namespace. The global attributes are type, href, role, arcrole, title, show, actuate, label, from, and to. All other attributes, and all elements, in the JSON Link namespace are reserved. Document creators use the JSON Link global attributes to make the elements in their own namespace, or even in a namespace they do not control, recognizable as JSON Link elements. The type attribute indicates the JSON Link element type (simple, extended, locator, arc, resource, or title); the element type dictates the JSON Link-imposed constraints that such an element must follow and the behavior of JSON Link applications on encountering the element.
Following is an example of a crossReference element from a non-JSON Link namespace that has JSON Link global attributes:
{
"my:crossReference": {
"@context": {
"my": "http://example.com/",
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "simple",
"jsonlink:href": "students.json",
"jsonlink:role": "http://www.example.com/linkprops/studentlist",
"jsonlink:title": "Student List",
"jsonlink:show": "new",
"jsonlink:actuate": "onRequest",
"text": "Current List of Students"
}
}
Using global attributes always requires the use of namespace prefixes on the individual attributes.
In [JSON Linking Language (JSON Link) Version 1.0], JSON Link elements are identified by the presence of an jsonlink:type attribute. In JSON Link 1.0, JSON Link elements are identified by the presence of either an jsonlink:type attribute or an jsonlink:href attribute
- If an element has an jsonlink:type attribute, then that attribute must have one of the following values: “simple”, “extended”, “locator”, “arc”, “resource”, or “title” and the element must adhere to the conformance constraints imposed by that JSON Link element type.
- If an element has an jsonlink:href attribute but does not have an jsonlink:type attribute, then it is treated exactly as if it had an jsonlink:type attribute with the value “simple”.
4.1. JSON Link Attribute Usage Patterns
While the JSON Link attributes are considered global by virtue of their use of the namespace mechanism, their allowed combinations on any one JSON Link element type depend greatly on the value of the special type attribute (see 5.3 JSON Link Element Type Attribute (type) for more information) for the element on which they appear. The conformance constraint notes in this specification detail their allowed usage patterns. Following is a summary of the element types (columns) on which the global attributes (rows) are allowed, with an indication of whether a value is required ® or optional (O):
simple | extended | locator | arc | resource | title | |
---|---|---|---|---|---|---|
type |
O* |
R |
R |
R |
R |
R |
href |
O* |
R |
||||
role |
O |
O |
O |
O |
||
arcrole |
O |
O |
||||
title |
O |
O |
O |
O |
O |
O |
show |
O |
O |
||||
actuate |
O |
O |
||||
label |
O |
O |
||||
from |
O |
|||||
to |
O |
- At least one of type or href must be specified.
(See also B Sample JSON-LD, C Sample JSON Schema, and D Sample RELAX NG Grammar for examples of non-normative schemas that illustrate the allowed patterns of attributes.)
This specification uses the convention “xxx-type element” to refer to elements that must adhere to a named set of constraints associated with a JSON Link element type, no matter what name the element actually has. For example, “locator-type element” would refer to all of the following elements:
{
"locator": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "locator",
"jsonlink:href": "..."
}
}
{
"loc": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "locator",
"jsonlink:href": "..."
}
}
{
"my:pointer": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "locator",
"jsonlink:href": "..."
}
}
4.2. JSON Link Element Type Relationships
Various JSON Link element types have special meanings dictated by this specification when they appear as direct children of other JSON Link element types. Following is a summary of the child element types that play a significant role in particular parent element types. (Other combinations are not conformant.)
Parent type | Significant child types |
---|---|
simple |
none |
extended |
locator, arc, resource, title |
locator |
title |
arc |
title |
resource |
none |
title |
none |
4.3. Attribute Value Defaulting
Using JSON Link potentially involves using a large number of attributes for supplying important link information. In cases where the values of the desired JSON Link attributes are unchanging across individual instances in all the documents of a certain type, attribute value defaults (fixed or not) may be added to a schema so that the attributes do not have to appear physically on element start-tags. For example, if attribute defaults were provided for the jsonlink:type, show, and actuate attributes in the example in the introduction to 4 JSON Link Markup Design, the example would look as follows:
{
"my:crossReference": {
"@context": {
"my": "http://example.com/",
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:href": "students.json",
"jsonlink:role": "http://www.example.com/linkprops/studentlist",
"jsonlink:title": "Student List",
"text": "Current List of Students"
}
}
Information sets that have been created under the control of a schema have all attribute values filled in. Note, however, that parsers are not required to process the external subset. Applications, such as web browsers, that do not process the external subset will not be aware of any default values identified therein.
Note also that using the attribute value default technique to specify the JSON Link namespace declaration has no equivalent in [RELAX NG], [JSON Schema Part 1: Structures], or other modern schema languages. While it can be used when schema-informed parsing is performed, it poses an interoperability risk and should be used with care.
4.4. Integrating JSON Link Usage with Other Markup
This specification defines only attributes and attribute values in the JSON Link namespace. There is no restriction on using non-JSON Link attributes alongside JSON Link attributes. In addition, most JSON Link attributes are optional and the choice of simple or extended link is up to the markup designer or document creator, so a schema that uses JSON Link features need not use or declare the entire set of JSON Link’s attributes. Finally, while this specification identifies the minimum constraints on JSON Link markup, schemas that use JSON Link are free to tighten these constraints. The use of JSON Link does not absolve a valid document from conforming to the constraints expressed in its governing schema.
Following is an example of a crossReference element with both JSON Link and non-JSON Link attributes:
{
"my:crossReference": {
"@context": {
"my": "http://example.com/",
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"my:lastEdited": "2000-06-10",
"jsonlink:type": "simple",
"jsonlink:href": "students.json",
"text": "Current List of Students"
}
}
4.5. Using JSON Link with Legacy Markup
Because JSON Link’s global attributes require the use of namespace prefixes, non-JSON Link-based links in legacy documents generally do not serve as conforming JSON Link constructs as they stand, even if attribute value defaulting is used. For example, HTML 4.01 has an a
element with an href
attribute, but because the attribute is a local one attached to the a
element in the HTML namespace, it is not the same as a jsonlink:href
global attribute in the JSON Link namespace.
This specification defines JSON Link markup, that is, what combinations JSON Link attributes and what arrangements of elements with JSON Link attributes are conformant. It also defines the JSON Link semantics of such conformant markup. When JSON Link is used on elements that have other attributes or related elements with linking semantics, JSON Link cannot and does not attempt to define the semantics of such combinations.
If an element allows such possibly conflicting markup to occur, it should specify the semantics of the result.
5. JSON Link Elements and Attributes
JSON Link offers two kinds of links:
- Extended links
- Simple links
5.1. Extended Links (extended-Type Element)
The only kind of link that is able to have inbound and third-party arcs is an extended link. Typically, extended linking elements are stored separately from the resources they associate (for example, in entirely different documents). Thus, extended links are important for situations where the participating resources are read-only, or where it is expensive to modify and update them but inexpensive to modify and update a separate linking element, or where the resources are in formats with no native support for embedded links (such as many multimedia formats).
The following diagram shows an extended link that associates five remote resources. This could represent, for example, information about a student’s course load: one resource being a description of the student, another being a description of the student’s academic advisor, two resources representing courses that the student is attending, and the last resource representing a course that the student is auditing.
Without the extended link, the resources might be entirely unrelated; for example, they might be in five separate documents. The lines emanating from the extended link represent the association it creates among the resources. However, notice that the lines do not have directionality. Directionality is expressed with traversal rules; without such rules being provided, the resources are associated in no particular order, with no implication as to whether and how individual resources are accessed.
The following diagram shows an extended link that associates five remote resources and one local resource (a special element inside the extended link element). This could represent the same sort of course-load example as
above, but this time associating one of the courses (perhaps a course in which the student is also a teaching assistant) with a local resource (perhaps an organizational chart showing the class structure).
JSON Link uses five types of elements in extended links:
- Extended link element
- Local resource element
- Remote resource element
- Arc element
- Title element
Extended links also have semantic attributes and traversal attributes.
5.1.1. Local Resources for an Extended Link (resource-Type Element)
A resource-type element is defined by specifying an element whose type attribute from the JSON Link namespace has the value “resource.” It can be useful to provide a semantic attribute (role) on resource-type elements to indicate the purpose of the resource in the context of the link.
The following example illustrates the use of resource-type elements within an extended link:
{
"extendedLink": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "extended",
"resources": [
{
"resource": {
"jsonlink:type": "resource",
"jsonlink:role": "http://www.example.com/linkprops/student",
"text": "Student"
}
},
{
"resource": {
"jsonlink:type": "resource",
"jsonlink:role": "http://www.example.com/linkprops/advisor",
"text": "Advisor"
}
}
]
}
}
5.1.2. Remote Resources for an Extended Link (locator-Type Element)
[Definition: A locator-type element is an element that participates in a link as a remote resource.] A locator-type element is defined by specifying an element whose type attribute from the JSON Link namespace has the value “locator.” A locator-type element must also have an href attribute from the JSON Link namespace that identifies the remote resource by means of an IRI reference.
The following example illustrates the use of locator-type elements within an extended link:
{
"extendedLink": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "extended",
"locators": [
{
"locator": {
"jsonlink:type": "locator",
"jsonlink:href": "http://www.example.com/student",
"jsonlink:role": "http://www.example.com/linkprops/student"
}
},
{
"locator": {
"jsonlink:type": "locator",
"jsonlink:href": "http://www.example.com/advisor",
"jsonlink:role": "http://www.example.com/linkprops/advisor"
}
}
]
}
}
5.1.3. Traversal Rules for an Extended Link (arc-Type Element)
[Definition: An arc-type element is an element that specifies traversal rules between resources in an extended link.] An arc-type element is defined by specifying an element whose type attribute from the JSON Link namespace has the value “arc.” An arc-type element must also have from and to attributes that specify the starting and ending resources for traversal, respectively.
The following example illustrates the use of arc-type elements within an extended link:
{
"extendedLink": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "extended",
"arcs": [
{
"arc": {
"jsonlink:type": "arc",
"jsonlink:from": "http://www.example.com/student",
"jsonlink:to": "http://www.example.com/advisor"
}
},
{
"arc": {
"jsonlink:type": "arc",
"jsonlink:from": "http://www.example.com/student",
"jsonlink:to": "http://www.example.com/course1"
}
}
]
}
}
5.1.4. Titles for Extended Links, Locators, and Arcs (title-Type Element)
[Definition: A title-type element is an element that provides a human-readable description for an extended link, a locator, or an arc.] A title-type element is defined by specifying an element whose type attribute from the JSON Link namespace has the value “title.” The title attribute can be used on extended link, locator, and arc elements to provide additional descriptive information.
The following example illustrates the use of title-type elements within an extended link:
{
"extendedLink": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "extended",
"title": "Student and Advisor Information",
"resources": [
{
"resource": {
"jsonlink:type": "resource",
"jsonlink:role": "http://www.example.com/linkprops/student",
"text": "Student"
}
},
{
"resource": {
"jsonlink:type": "resource",
"jsonlink:role": "http://www.example.com/linkprops/advisor",
"text": "Advisor"
}
}
],
"arcs": [
{
"arc": {
"jsonlink:type": "arc",
"jsonlink:from": "http://www.example.com/student",
"jsonlink:to": "http://www.example.com/advisor",
"title": "Student to Advisor"
}
}
]
}
}
5.1.5. Locating Linkbases (Special Arc Role)
A special arc role can be used to locate linkbases that contain extended links. The arc element with this special arc role acts as a pointer to a document that contains extended links.
The following example illustrates the use of a special arc role to locate a linkbase:
{
"extendedLink": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "extended",
"arcs": [
{
"arc": {
"jsonlink:type": "arc",
"jsonlink:from": "http://www.example.com/student",
"jsonlink:to": "http://www.example.com/linkbase.json",
"jsonlink:arcrole": "http://www.w3.org/1999/jsonlink/linkbase"
}
}
]
}
}
5.2. Simple Links (simple-Type Element)
The following example illustrates the use of a simple link:
{
"simpleLink": {
"@context": {
"jsonlink": "http://www.w3.org/1999/jsonlink"
},
"jsonlink:type": "simple",
"jsonlink:href": "http://www.example.com/student",
"jsonlink:role": "http://www.example.com/linkprops/studentlist",
"jsonlink:title": "Student List",
"jsonlink:show": "new",
"jsonlink:actuate": "onRequest",
"text": "Current List of Students"
}
}
5.3. JSON Link Element Type Attribute (type)
The type attribute from the JSON Link namespace specifies the element type and determines the set of JSON Link-imposed constraints that the element must follow. The allowed values for the type attribute are:
- “simple” for simple links
- “extended” for extended links
- “locator” for locator-type elements
- “arc” for arc-type elements
- “resource” for resource-type elements
- “title” for title-type elements
5.4. Locator Attribute (href)
The href attribute from the JSON Link namespace identifies the remote resource by means of an IRI reference. The href attribute must be specified for locator-type elements and simple links.
5.5. Semantic Attributes (role, arcrole, and title)
The role, arcrole, and title attributes from the JSON Link namespace provide additional semantic information about the link.
- The role attribute specifies the purpose of the resource in the context of the link.
- The arcrole attribute specifies the nature of the traversal between resources.
- The title attribute provides a human-readable description of the link.
5.6. Behavior Attributes (show and actuate)
The show and actuate attributes from the JSON Link namespace control the behavior of the link.
5.6.1. show Attribute
The show attribute specifies the behavior of the link when it is traversed. Allowed values are:
- “new” to open the linked resource in a new context
- “replace” to replace the current context with the linked resource
- “embed” to embed the linked resource within the current context
5.6.2. actuate Attribute
The actuate attribute specifies when the link should be traversed. Allowed values are:
- “onLoad” to traverse the link when the resource is loaded
- “onRequest” to traverse the link only when requested by the user
5.7. Traversal Attributes (label, from, and to)
The label, from, and to attributes from the JSON Link namespace are used to specify traversal rules for extended links.
- The label attribute provides a unique identifier for a resource within the context of an extended link.
- The from attribute specifies the starting resource for traversal.
- The to attribute specifies the ending resource for traversal.
This concludes the detailed text provision for the JSON Link specification. This text can be integrated into the standard documentation to provide a comprehensive guide to using JSON Link for linking JSON documents.
Leave a Reply