Convert From JSON
Convert From JSON node for Builder — parse a JSON string into a Python dictionary or structured object, making individual fields from API responses accessible to downstream nodes.
🎯 Purpose
Section titled “🎯 Purpose”Parses a JSON string and converts it into a stringified Python dictionary. The result can be stored, logged, or passed to downstream nodes that handle Python-style string data rather than raw JSON.
📥 Inputs
Section titled “📥 Inputs”- JSON Input — A valid JSON object or array in string form.
📤 Outputs
Section titled “📤 Outputs”- A single output containing the parsed JSON represented as a stringified Python dictionary.
Example:
Input →{"name": "Alice", "age": 32}
Output →"{'name': 'Alice', 'age': 32}"
📘 Best Practices
Section titled “📘 Best Practices”- Ensure Valid JSON: Invalid JSON will return an error.
- Use Only When Needed: Most nodes prefer JSON directly; use this node only when a Python-compatible string is required.
- Validate Downstream Compatibility: Confirm that receiving nodes expect a string, not a structured object.
🧪 Test Cases
Section titled “🧪 Test Cases”- Given:
{ "name": "Alice", "age": 32, "husband": null }
Expected:"{'name': 'Alice', 'age': 32, 'husband': None}" - Given:
[1, 2, 3]
Expected:"[1, 2, 3]" - Given: Invalid JSON
Expected: Error: invalid JSON format
🗂️ Real-World Use Cases
Section titled “🗂️ Real-World Use Cases”- Logging: Store structured API responses as stringified dicts.
- Debugging: Inspect complex JSON in workflow logs or test outputs.
✅ Step-by-Step (Quick Start)
Section titled “✅ Step-by-Step (Quick Start)”- Add ConvertFromJSON to your workflow.
- Connect a node that outputs JSON text.
- Run the workflow to produce a stringified Python dictionary.
- Confirm downstream nodes or scripts accept the output format.
- Save and deploy.