parse json (repair)

This block is part of the anthropic group and was last modified in core v15.0.0.

parse json (repair) v15.0.0

Recover and parse JSON from messy text (code fences, prose, trailing commas, truncation). No API call.

In pins 1 + flow
  • flow
    flow
  • input required
    value

    The (possibly malformed) JSON text.

Out pins 5 + flow
  • flow
    flow
  • success
    condition
  • json
    object

    The parsed value.

  • repaired
    condition

    True if a fix was applied.

  • errors
    array<value>

    Error codes when the call fails (success=false): parse_error.

  • error detail
    value
repair json
fix json
lenient json
json parse
clean json

A typical wiring for parse JSON (repair): a function trigger starts the flow; value feeds the input pin; the flow out pin feeds debug.

Studio canvas example for the parse JSON (repair) block: typical wiring for parse JSON (repair).

Version history

Introduced in v15.0.0.


Back to anthropic Return to the main group to view all sub-groups Back to anthropic Return to the group to view all blocks within this group