You are working with an API and the return comes back as a JSON string instead of being a JSON object. You would like to verify that the string is valid JSON before attempting to convert it to JSON.
Overview
This transform will check whether or not a string provided via the 'String to Check' input is a valid JSON string.
Parameters
Parameter
Description
Required
String to Check
The string to validate.
This transform is useful for confirming a string is a valid JSON string prior to converting it to json using a filter such as |json
Usage
Example 1: Providing a valid JSON string
Input:
Example 2: Providing a invalid JSON string
Input:
Results output
This transform will output a boolean value (True/False) based on whether or not the string is a valid JSON string.