Skip to main content
The JSON Parse command (Command Type: 1007) parses the JSON string in the command result’s data field and replaces data with the parsed object. Use it when a previous command returned JSON as text, for example an HTTP response body, so that later commands such as Json Path can query it.

Command Type

Command Type ID: 1007

Parameters

This command takes no parameters. It always reads from and writes to data.

Usage Examples

Parse an HTTP Response Body

Parse, Then Extract

Output Structure

Given data containing the string "{\"items\":[{\"id\":1},{\"id\":2}]}", the command result’s data becomes:

Error Handling

  • Invalid JSON: The command throws, the rest of the step does not run, and the run counts as invalid
  • Already an object: Do not add JSON Parse when data is already an object; parse only text

Best Practices

  • Chain with Json Path: Use JSON Parse followed by Json Path for extraction
  • Validate first: Add a Validation command before parsing if the source sometimes returns HTML or error text