json-repair-lite
v1.0.3Free: fix broken or cut-off JSON, like AI output.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
repair_json_text Repair broken JSON text
Repair broken or incomplete JSON, including output from language models. Use this when you have JSON in the conversation that may be missing quotes, have trailing commas, or be cut off. It is plain code, not an AI model: it can close missing brackets and fix common syntax issues, but it cannot invent the data you meant to write. Already-valid JSON is returned as-is, with wasValid true and repaired false. Do not use it for a file on disk (use repair_json_file for files). json_lines: if true, each non-empty line is a separate document. If false (default), the wh…
| Parameter | Type | Description |
|---|---|---|
text * | string | The JSON text to repair. May be one value, or several JSON Lines. |
json_lines | boolean | If true, treat each non-empty line as its own JSON document. |
repair_json_file Repair JSON in a local file
Read a local JSON file and repair it if it is broken or incomplete. Use this when the JSON is in a file on this computer, so you don't have to paste it. The file is only read, never changed. Files larger than 5 MB are rejected; use the Apify version for bigger jobs. Do not use it for files that are not JSON text. path: full path to a UTF-8 text file, up to 5 MB. json_lines: if true, each non-empty line is a separate document. If false (default), the whole text is tried as one JSON value first. Returns the same object as repair_json_text.
| Parameter | Type | Description |
|---|---|---|
path * | string | Full path to a UTF-8 .json or .jsonl file, up to 5 MB. |
json_lines | boolean | If true, treat each non-empty line as its own JSON document. |