A JSON document (JSON text) is a serialized JSON value (
Section 2 of RFC 8259). A JSON value is a JSON object, a JSON array, a number, a string or any of the three literal names true, false or null.
A Jex expressions can be applied only against documents containing a single JSON object. All other values or any combination of values (at the top level) are not supported.
The following example document is valid. It contains a single JSON object.
The next document is not supported for use with Jex expressions, though it is a valid JSON document. It contains a JSON array at the top level.
A JSON array consists of an ordered list of array items. Each array item can be a scalar value, a JSON object, or a JSON array. According to
Section 5 of RFC 8259 there is no requirement that the values in an array are of the same type.
Jex supports only arrays with the following properties:
-
The array items of an array are all of the same type.
-
Array items can be only scalars or JSON objects, but not JSON arrays.