pdk.flow.JsonArray

functions to operate with JSON array

All functions


addBoolean

adds new element with type Boolean to the input array.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = []
value :: pdk.core.Boolean = true

addBoolean(jsonArray, value) :: Void ->
jsonArray = [true]
value = true

addFloat

adds new element with type Float to the input array.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = []
value :: pdk.core.Float = 3.1415

addFloat(jsonArray, value) :: Void ->
jsonArray = [3.1415]
value = 3.1415

addInteger

adds new element with type Integer to the input array.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = []
value :: pdk.core.Integer = 100

addInteger(jsonArray, value) :: Void ->
jsonArray = [100]
value = 100

addString

adds new element with type String to the input array.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = []
value :: pdk.core.String = 'Amsterdam'

addString(jsonArray, value) :: Void ->
jsonArray = ['Amsterdam']
value = 'Amsterdam'

addJsonObject

adds new element with type JsonObject to the input array.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = []
value :: pdk.core.JsonObject = {
    address: 'Korte Ouderkerkerdijk'
}

addJsonObject(jsonArray, value) :: Void ->
jsonArray = [{
    address: 'Korte Ouderkerkerdijk'
}]

value = {
    address: 'Korte Ouderkerkerdijk'
}

addJsonArray

adds new element with type JsonArray to the input array.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = []
value :: pdk.core.JsonArray = [{
    address: 'Korte Ouderkerkerdijk'
}]

addJsonArray(jsonArray, value) :: Void ->
jsonArray = [[{
    address: 'Korte Ouderkerkerdijk'
}]]

value = [{
    address: 'Korte Ouderkerkerdijk'
}]


setBoolean

replaces the existing element with a new element of type Boolean.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = [1, 'Amsterdam', 3.1415]
position :: pdk.core.Integer = 1
value :: pdk.core.Boolean = true

setBoolean(jsonArray, position, value) :: Void ->
jsonArray = [1, true, 3.1415]
value = true

setFloat

replaces the existing element with a new element of type Float.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = [1, 'Amsterdam', false]
position :: pdk.core.Integer = 1
value :: pdk.core.Float = 3.1415

setFloat(jsonArray, position, value) :: Void ->
jsonArray = [1, 3.1415, false]
value = 3.1415

setInteger

replaces the existing element with a new element of type Integer.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = [3.1415, 'Amsterdam', false]
position :: pdk.core.Integer = 1
value :: pdk.core.Integer = 100

setInteger(jsonArray, position, value) :: Void ->
jsonArray = [3.1415, 100, false]
value = 100

setString

replaces the existing element with a new element of type String.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = [3.1415, 100, false]
position :: pdk.core.Integer = 1
value :: pdk.core.String = 'Amsterdam'

setString(jsonArray, position, value) :: Void ->
jsonArray = [3.1415, 'Amsterdam', false]
value = 'Amsterdam'

setJsonObject

replaces the existing element with a new element of type JsonObject.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = [3.1415, 100, false]
position :: pdk.core.Integer = 1
value :: pdk.core.JsonObject = {
    address: 'Korte Ouderkerkerdijk'
}

setJsonObject(jsonArray, position, value) :: Void ->
jsonArray = [3.1415, {
    address: 'Korte Ouderkerkerdijk'
}, false]

value = {
    address: 'Korte Ouderkerkerdijk'
}

setJsonArray

replaces the existing element with a new element of type JsonArray.

Arguments:

Result:

  • No variable is returned. An array contains a new element.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = [3.1415, 100, false]
position :: pdk.core.Integer = 1
value :: pdk.core.JsonArray = [{
    address: 'Korte Ouderkerkerdijk'
}]

setJsonArray(jsonArray, position, value) :: Void ->
jsonArray = [3.1415, [{
    address: 'Korte Ouderkerkerdijk'
}], false]

value = [{
    address: 'Korte Ouderkerkerdijk'
}]

removeItem

removes the element at a specific position from the jsonArray.

Arguments:

Result:

  • No variable is returned. An array without an element removed from the specified position.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = [3.1415, 100, false]
position :: pdk.core.Integer = 1

removeItem(jsonArray, position) :: Void ->
jsonArray = [3.1415, false]

removeAll

removes all elements from the jsonArray.

Arguments:

Result:

  • No variable is returned. An array is empty.

Possible exceptions

Example:

jsonArray :: pdk.net.JsonArray = [3.1415, 100, false]

removeAll(jsonArray) :: Void ->
jsonArray = []

mappingToVariable

assigns the JSON Array data to a variable.

Arguments:

Result:

  • No output. The variable is initialized.

Possible exceptions


Last updated