Information can be represented in a structured way using markup languages. Well-known and widely used markup languages are for example XML and JSON.
It is often required to identify distinct portions in XML or JSON documents. For XML, XPath has been designed for that purpose. XPath is very powerful and includes capabilities for conditional node selection with predicates. XPath expressions can select one or more portions of an XML document.
JSON Pointer serves a similar purpose. However, its capabilities are limited compared to XPath. For example, JSON Pointer expressions can identify only a specific node or subtree of a JSON document and not multiple nodes or subtrees. Furthermore, conditions are not supported in the information selection process.
This calls for a notation applicable to JSON documents with more advanced features than JSON Pointer. This notation is called Jex (JSON expressions). It is inspired by and based on XPath.
Even though XPath was originally designed to select one or more nodes of an XML document, XPath expressions operate on a conceptual data model, the XPath data model. A mapping from the XML Information Set to the XPath data model is provided in
Annex B of XPath 1.0 [2].
The main purpose of the Jex specification is to provide a mapping from a JSON document to the XPath data model. With this in place XPath expressions are (indirectly) applicable to JSON.
The present document will also introduce a few profiles for XPath. These profiles are designed to provide the functionality required for network and service management.
Clause 4 provides a short review of the XPath data model.
Clause 6 defines the mapping of a JSON document to the XPath data model, and
clause 7 introduces a few Jex profiles.
Annex A demonstrates to use of Jex for network management tasks.
Readers should be familiar with
XPath 1.0 [2] and JSON (IETF
RFC 8259).
The present TS introduces JSON expressions (Jex).
The following documents contain provisions which, through reference in this text, constitute provisions of the present document.
-
References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific.
-
For a specific reference, subsequent revisions do not apply.
-
For a non-specific reference, the latest version applies. In the case of a reference to a 3GPP document (including a GSM document), a non-specific reference implicitly refers to the latest version of that document in the same Release as the present document.
The XPath data model is described in
clause 5 of W3C Xpath1.0 specification [2]. It is a conceptual model without formal notation.
The model consists of nodes with relationships between them. There are seven types of nodes defined: root node, element node, text node, attribute node, namespace node, processing instruction node, comment node.
Note that the data model for
XPath 2.0 [3] and
XPath 3.1 [4] is described in XQuery and in
XPath Data Model 3.1 [5]. This model is not used in the present document.