ProcessMIX Guide
  • Platform Overview
    • Introduction
    • Platform Purpose
    • Main Concepts
      • Organization Structure
      • Visual Language
      • Project Development Environment (IDE)
      • Deployment and Integration
      • Administration and Troubleshooting
    • First Steps
    • Change Log
      • 5.0.0
      • 5.0.5
      • 5.0.5.1
      • 5.0.5.2
      • 5.0.5.3
      • 5.0.5.4
  • Language Reference Guide
    • Overview
    • Data Structures and Types
      • Core Types (pdk.core)
      • Dictionary (pdk.asset.dictionary)
      • Scorecard (pdk.asset.scorecard)
      • Blockchain (pdk.blockchain)
      • Exceptions (pdk.ex)
      • Input/Output (pdk.io)
      • JSON Web Token (pdk.jwt)
      • Networking (pdk.net)
      • HTTP (pdk.net.http)
      • SOAP/Web Services (pdk.net.soap)
      • XML/DOM (pdk.net.xml)
      • S3 (pdk.s3)
      • SQL (pdk.sql)
      • Postgres (pdk.db.postgre)
      • Util (pdk.util)
      • Default Data Structure Field Values
    • Flows
      • Variables
        • Local Flow Variables
        • Node Variables
      • Flow Node Types
        • Core Nodes
          • In
          • Out
          • Assign
          • If
          • Switch
          • Iterator
          • Function Call
          • Subflow
          • Raise Exception
          • Exception Handler
          • Validator
        • Connector Nodes
          • Database Begin Transaction
          • Database Commit Transaction
          • Database Rollback Transaction
          • Database Query Executor
          • EVM Blockchain Functions
          • EVM Blockchain Smart Contract Functions
          • REST Service Executor
          • SOAP Service Executor
          • S3 Connector
          • SMB Connector
      • Expressions
      • Built-In Functions
        • Expression functions
          • pdk.util.Any
          • pdk.util.Array
          • pdk.util.Blockchain
          • pdk.util.Cast
          • pdk.util.Codec
          • pdk.util.Crypto
          • pdk.util.Date
          • pdk.util.File
          • pdk.util.Json
          • pdk.util.JWT
          • pdk.util.Map
          • pdk.util.Math
          • pdk.util.String
          • pdk.util.Util
        • Node functions
          • pdk.flow.Any
          • pdk.flow.Array
          • pdk.flow.File
          • pdk.flow.JsonArray
          • pdk.flow.JsonObject
          • pdk.flow.HttpRequest
          • pdk.flow.HttpResponse
          • pdk.flow.Logger
          • pdk.flow.Map
          • pdk.flow.Xml
            • pdk.flow.xml.XmlAttr
            • pdk.flow.xml.XmlElement
            • pdk.flow.xml.XmlNode
            • pdk.flow.xml.XmlDocument
            • pdk.flow.xml.XmlDocumentType
            • pdk.flow.xml.XmlDOMConfiguration
            • pdk.flow.xml.XmlDOMImplementation
            • pdk.flow.xml.XmlProcessingInstruction
            • pdk.flow.xml.XmlTypeInfo
            • pdk.flow.xml.XmlCharacterData
            • pdk.flow.xml.XmlText
            • pdk.flow.xml.XmlNamedNodeMap
          • pdk.node.BlockchainEth
          • pdk.node.S3
          • pdk.node.Smb
      • Exceptions
        • Checked Exceptions
        • Runtime Exceptions
    • Assets
      • Dictionary
      • Decision Table
      • Scorecard
      • PMML
    • Connectors
      • DB Connector
        • Prepared Query
        • Dynamic Query
        • Query input parameters
        • Stored Procedure
      • REST Connector
      • SOAP Connector
      • S3 Connector
      • SMB Connector
      • EVM Blockchain Connector
    • Global Variables
    • Appendices
      • Overview of Database Transactions
      • Reserved Words
  • Project Development Environment (IDE)
    • Project Explorer Panel
    • Flow Builder
    • Flow Node Editor
    • Data Structure Builder
    • Connector Builders
      • REST Connector Builder
      • SOAP Connector Builder
      • DB (Database) Connector Builder
      • EVM Blockchain Connectors Builder
      • S3 Connector Builder
    • Asset Builders
      • Dictionary Builder
      • Decision Table Builder
      • Scorecard Builder
      • PMML Asset Builder
    • Global Variables Panel
    • Expression Editor
    • Project Deployment and Execution
    • Cron Expression Generator
    • Test Helper
    • Debugging the Project
    • DB transactions
    • Team Collaboration Tools
      • Version Control
      • Conflict Resolver
    • Selectors
    • Error Panel
    • Local History
  • Home and Administration Guide
    • Organization and Subscription
    • Organization Team
    • Repositories and Projects
    • Environments
    • Deployments
    • Database Provisioning
    • Roles and Permissions
  • Logs and Troubleshooting
    • Request/Call Logs
    • Deployment Logs
    • Application Logs
  • Appendix: Example Project
    • Risk Mitigation Solution
Powered by GitBook
On this page
  • All functions
  • setBoolean
  • setFloat
  • setInteger
  • setString
  • setJsonObject
  • setJsonArray
  • removeField
  • removeAllFields
  • mappingToVariable
  1. Language Reference Guide
  2. Flows
  3. Built-In Functions
  4. Node functions

pdk.flow.JsonObject

functions to operate with JSON object

Previouspdk.flow.JsonArrayNextpdk.flow.HttpRequest

Last updated 1 year ago

All functions


setBoolean

replaces the existing field with a Boolean value or adds a new field.

Arguments:

  • jsonObject ::

  • field ::

  • value ::

Result:

  • No variable is returned. A field in the object was set.

Possible exceptions

Example:

jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "cat"
}

field :: pdk.core.String = "type"
value :: pdk.core.Boolean = true

setBoolean(jsonObject, field, value) :: Void ->
jsonObject = {
    "id": 1,
    "type": true
}
jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "cat"
}

field :: pdk.core.String = "isProcessed"
value :: pdk.core.Boolean = false

setBoolean(jsonObject, field, value) :: Void ->
jsonObject = {
    "id": 1,
    "type": true,
    "isProcessed": false
}

setFloat

replaces the existing field with a Float value or adds a new field.

Arguments:

Result:

  • No variable is returned. A field in the object was set.

Possible exceptions

Example:

jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "cat"
}

field :: pdk.core.String = "price"
value :: pdk.core.Float = 10.99

setFloat(jsonObject, field, value) :: Void ->
jsonObject = {
    "id": 1,
    "type": true,
    "price": 10.99
}

setInteger

replaces the existing field with a Integer value or adds a new field.

Arguments:

Result:

  • No variable is returned. A field in the object was set.

Possible exceptions

Example:

jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "cat"
}

field :: pdk.core.String = "count"
value :: pdk.core.Integer = 81

setInteger(jsonObject, field, value) :: Void ->
jsonObject = {
    "id": 1,
    "type": true,
    "count": 81
}

setString

replaces the existing field with a String value or adds a new field.

Arguments:

Result:

  • No variable is returned. A field in the object was set.

Possible exceptions

Example:

jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "cat"
}

field :: pdk.core.String = "name"
value :: pdk.core.String = "Tom"

setString(jsonObject, field, value) :: Void ->
jsonObject = {
    "id": 1,
    "type": true,
    "name": "Tom"
}

setJsonObject

replaces the existing field with a JsonObject value or adds a new field.

Arguments:

Result:

  • No variable is returned. A field in the object was set.

Possible exceptions

Example:

jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "book"
}

field :: pdk.core.String = "author"
value :: pdk.net.JsonObject = {
    "name": "Peter"
}

setJsonObject(jsonObject, field, value) :: Void ->
jsonObject = {
    "id": 1,
    "type": "book",
    "author": {
        "name": "Peter"
    }
}

setJsonArray

replaces the existing field with a JsonArray value or adds a new field.

Arguments:

Result:

  • No variable is returned. A field in the object was set.

Possible exceptions

Example:

jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "book"
}

field :: pdk.core.String = "tags"
value :: pdk.net.JsonArray = [{
    "id": 1,
    "name": "Detective"
}]

setJsonObject(jsonObject, field, value) :: Void ->
jsonObject = {
    "id": 1,
    "type": "book",
    "tags": [{
        "id": 1,
        "name": "Detective"
    }]
}

removeField

removes field from the jsonObject.

Arguments:

Result:

  • No variable is returned. An object without a field

Possible exceptions

Example:

jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "book"
}

field :: pdk.core.String = "type"

removeField(jsonObject, field) :: Void ->
jsonObject = {
    "id": 1
}

removeAllFields

removes all fields from the jsonObject.

Arguments:

Result:

  • No variable is returned. An object without any fields

Possible exceptions

Example:

jsonObject :: pdk.net.JsonObject = {
    "id": 1,
    "type": "book"
}

removeAllFields(jsonObject) :: Void ->
jsonObject = {}

mappingToVariable

assigns the JSON Object data to a variable.

Arguments:

Result:

  • No output. The variable is initialized.

Possible exceptions


- throws if the input object is NULL

jsonObject ::

field ::

value ::

- throws if the input object is NULL

jsonObject ::

field ::

value ::

- throws if the input object is NULL

jsonObject ::

field ::

value ::

- throws if the input object is NULL

jsonObject ::

field ::

value ::

- throws if the input object is NULL

jsonObject ::

field ::

value ::

- throws if the input object is NULL

jsonObject ::

field ::

- throws if the input object or the field is NULL

jsonObject ::

- throws if the input object is NULL

jsonObject ::

variable ::

- throws if the input jsonObject is NULL

- throws if the jsonObject can not be mapped to the variable structure

setBoolean
setFloat
setInteger
setString
setJsonObject
setJsonArray
removeField
removeAllFields
mappingToVariable
pdk.net.JsonObject
pdk.net.JsonObject
pdk.net.JsonObject
pdk.net.JsonObject
pdk.net.JsonObject
pdk.net.JsonObject
pdk.net.JsonArray
pdk.net.JsonObject
pdk.net.JsonObject
pdk.net.JsonObject
pdk.net.JsonObject
pdk.core.String
pdk.core.Boolean
pdk.core.String
pdk.core.Float
pdk.core.String
pdk.core.Integer
pdk.core.String
pdk.core.String
pdk.core.String
pdk.core.String
pdk.core.String
pdk.core.UserObject
JsonMapException
NullPointerException
NullPointerException
NullPointerException
NullPointerException
NullPointerException
NullPointerException
NullPointerException
NullPointerException
NullPointerException