Namespace: json

planBuilder. json

Builds expressions to call functions in the json server library for a row pipeline.
Since:
  • 2.1.1

Methods


array(array) → {JsonArray}

Creates a (JSON) array, which is like a sequence of values, but allows for nesting. Provides a client interface to a server function. See json.array
Parameters:
Name Type Argument Description
array ElementNode <optional>
A serialized array element.
Since:
  • 2.1.1
Returns:
Type
JsonArray

arraySize(array) → {XsUnsignedLong}

Returns the size of the array. Provides a client interface to a server function. See json.arraySize
Parameters:
Name Type Argument Description
array JsonArray <optional>
An array.
Since:
  • 2.1.1
Returns:
Type
XsUnsignedLong

arrayValues(array, flatten) → {Item}

Returns the array values as an XQuery sequence. Provides a client interface to a server function. See json.arrayValues
Parameters:
Name Type Argument Description
array JsonArray <optional>
An array.
flatten XsBoolean <optional>
Include values from subarrays in the sequence. The default is false, meaning that subarrays are returned as array values.
Since:
  • 2.1.1
Returns:
Type
Item

object(map) → {JsonObject}

Creates a JSON object, which is a kind of map with a fixed and ordered set of keys. Provides a client interface to a server function. See json.object
Parameters:
Name Type Argument Description
map ElementNode <optional>
A serialized JSON object.
Since:
  • 2.1.1
Returns:
Type
JsonObject

objectDefine(keys) → {JsonObject}

Creates a JSON object. Provides a client interface to a server function. See json.objectDefine
Parameters:
Name Type Argument Description
keys XsString <optional>
The sequence of keys in this object.
Since:
  • 2.1.1
Returns:
Type
JsonObject

subarray(array, startingLoc, length) → {JsonArray}

Extract a subarray from an array, producing a new array. The second and third arguments to this function operate similarly to those of fn:subsequence for XQuery sequences. Provides a client interface to a server function. See json.subarray
Parameters:
Name Type Argument Description
array JsonArray <optional>
An array.
startingLoc XsNumeric <optional>
The starting position of the start of the subarray.
length XsNumeric <optional>
The length of the subarray.
Since:
  • 2.1.1
Returns:
Type
JsonArray

toArray(items, limit, zero) → {JsonArray}

Constructs a json:array from a sequence of items. Provides a client interface to a server function. See json.toArray
Parameters:
Name Type Argument Description
items Item <optional>
The items to be used as elements in the constructed array.
limit XsNumeric <optional>
The size of the array to construct. If the size is less than the length of the item sequence, only as "limit" items are put into the array. If the size is more than the length of the sequence, the array is filled with null values up to the limit.
zero Item <optional>
The value to use to pad out the array, if necessary. By default the empty sequence is used.
Since:
  • 2.1.1
Returns:
Type
JsonArray
Copyright (c) 2020 MarkLogic Corporation Documentation generated by JSDoc 3.6.4 on 2020-08-04T23:55:50-07:00 using the DocStrap template.