JSON Cleaner component (AI Flowi Workflow)
The catalogue describes JSON Cleaner as: “Cleans the messy and sometimes incorrect JSON strings produced by LLMs so that they are fully compliant with the JSON spec.” Its output remains a Message containing a cleaned JSON string.
JSON Cleaner is documented in the catalogue; not production-tested by Ai Flowi.
By Ai Flowi · Published
Catalogue reference
This string-cleaning contract is documented under processing.JSONCleaner in the AI Flowi Workflow 1.9.2 catalogue, exported 9 October 2026; see the component catalogue for its category entry.
Inputs
json_str is required; normalize_unicode, remove_control_chars and validate_json are optional bool settings. Their exported names do not establish defaults or exact cleaning rules.
| Name | Type | Required | Accepted input types | Plain explanation |
|---|---|---|---|---|
json_str | str | Yes | Message | Required JSON string to clean, accepting Message as its connection type. |
normalize_unicode | bool | No | Not listed | Unicode-normalization switch; the normalization form and affected characters are not specified. |
remove_control_chars | bool | No | Not listed | Control-character-removal switch; the covered characters and treatment of escapes are undocumented. |
validate_json | bool | No | Not listed | JSON-validation switch. The export gives no validation algorithm or failure contract. |
Outputs
| Display name | Name | Type |
|---|---|---|
| Cleaned JSON String | output | Message |
Cleaned JSON String is the output display name; the port is output and its type is Message. That port matches JSON String Parser.json_text if a later stage needs to parse the cleaned object text.
When to use JSON Cleaner
Choose JSON Cleaner for a cleaning stage between model-produced JSON text and later processing. Inspect the cleaned string before using it as structured input; the catalogue description is not a recorded repair result for any malformed sample.
When to choose another component
If the next task is object-text parsing, read the existing JSON String Parser reference. If the source is already structured JSON, use the JSON Operations guide for object operations instead of assuming a Message input accepts it directly.
Minimal configuration
example configuration, not a recorded test
| Catalogue input name | Example setting |
|---|---|
json_str | {"sample":"demo",} |
validate_json | true |
The synthetic json_str value intentionally contains a trailing comma to illustrate a possible cleaning input. validate_json is a boolean setting; no repaired output, accepted-input result or validation error is claimed for this sample.
Limitations
- The catalogue does not enumerate repairable defects, markdown-fence handling, commentary removal or behavior with truncated JSON. Its stated purpose does not guarantee repair of arbitrary model output.
- Unicode normalization and control-character removal may matter to content preservation, but their exact transformations are absent. Compare the original and cleaned text before using text values in a later action.
- validate_json has no exported schema input, error output or failure behavior. JSON syntax compliance alone cannot establish that required application fields have valid values.
- Only a Message output is listed for JSON Cleaner. It does not expose a JSON-typed port in this export, and no cleaner-specific production result was found in the supplied use-case pages.
For upstream model access and reusable values, consult models and variables instead of repeating provider setup here.
Node usage
For JSON-cleaning workflow costs and model access, see pricing, the cost guide and models and variables.
Related components
JSON String Parser · JSON Operations · Type Convert · Language Model