Skip to main content

Deserialize JSON

AutomatR.DeafultActivities.API.DeserializeJSON

The "Deserialize JSON" activity in AutomatR is designed to deserialize a JSON string into a Newtonsoft.Json.Linq.JObject variable. This activity is particularly useful for processing JSON data within automation workflows.

Properties

NameDescription
Input
JSONSpecifies the JSON string that needs to be deserialized. This input is required for the activity to function correctly. Provide a string containing the JSON data, such as {'TenancyName': 'Documentation'}. String variables containing the JSON data.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Deserialize JSON" activity. This optional delay can be used to manage synchronization or pacing issues. Integer variables containing the delay duration (e.g., 5 for 5 seconds).
Output
JSON ObjectOutputs the deserialized JSON as a Newtonsoft.Json.Linq.JObject variable. This variable can be used for further processing of the JSON data within the workflow. Variables of type JObject to store the deserialized JSON.

How to use:

  1. Drag and drop the "Deserialize JSON" activity onto the workflow.
  2. Configure the properties by specifying the JSON string to be deserialized.
  3. Optionally, configure the delay to control the timing of the activity.
  4. Execute the workflow to deserialize the specified JSON string.

Example: Consider an example where the "Deserialize JSON" activity is used to parse a JSON string representing tenant information:

Deserialize JSON:
JSON: "{'TenancyName': 'Documentation'}"
Delay: 3
JSON Object: deserializedJsonObject

In this example, the activity deserializes the provided JSON string after a delay of 3 seconds. The deserialized JSON object is stored in the variable deserializedJsonObject for further use in the workflow.