- Attempt to convert raw text into a JSON value
- If unable to parse, outputs to failure pin
- Does not guarantee a particular structure
- Result can be an object, array or primitive value
- Use Validate JSON to ensure structure
- Takes JSON or primitive values into a JSON array
- Does not parse text into JSON
- Can take any number of inputs
- Input pins correspond to index in array
- Unwired pins will have null entries in the output
- Rarely useful alone, but works well with Transform JSON
- Uses a JSON schema to ensure the structure of a JSON value
- You can use an LLM to generate a schema
- Can also create from examples using generators on the web:
- An advanced tool for manipulating JSON documents
- Uses jaq which is based on jq
- Functional expression language for structural transformations
- Very flexible and efficient once familiar
- Use cases
- Restructure arrays from Gather JSON into objects
- Transform JSON value into arguments for Invoke Tool
- Create templating context for Template nodes
- Filter and restructure data from tool results
- Convert a JSON value into a native wire type
- If JSON input is not compatible, node will emit a failure
- Use Parse/Transform/Unwrap to extract data from (semi-) structured text
- e.g. parse a tool result, transform to a single value, then unwrap