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:array-size
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:array-values
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:object-define
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:to-array
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 4.0.0 on 2024-08-19T23:06:48-07:00 using the DocStrap template.