JSON

Description

The following OverNode are used to manage JSON data.

Note: To read the JSONNode value you must convert it into a string using the node ToString.

Has Key

The "Has Key" node checks if a specified key exists within a JSON object. It takes a JSONNode and a string key as inputs and returns a boolean result. This node is particularly useful in parsing JSON data, allowing the user to verify the presence of data before attempting to access it, thus avoiding potential errors in the data handling process.

Get JSON Value

The "Get JSON Value" node is designed to retrieve a value from a JSON object using a specified key. It accepts a JSONNode and a key as inputs and outputs the corresponding value as a JSONNode. If the key does not exist within the JSON object, a warning is logged, and the node outputs null. This node is essential for extracting specific pieces of data from JSON structures, particularly when handling responses from web services or parsing JSON data files.

Set JSON Entry

The "Set JSON Entry" node is used to modify or add a new key-value pair to a JSON object. It accepts a JSONNode, a key, and a value as inputs. The node updates the JSON object with the new value for the specified key or adds the key-value pair if the key does not exist. The result is an updated JSON object. This operation is fundamental when manipulating JSON structures, such as configuring settings, updating data, or preparing payloads for web requests.

Last updated