How to repair many broken JSON files in one pass
When an export writes hundreds of small JSON documents, the same syntax mistake usually appears in many of them. Opening each file is slow, and a shell loop over a one-file tool hides which files were changed.
One request, one result per item
JSON Batch Repair takes a list of named items and answers with one result per item, so a failure in one document never hides the outcome of the rest. Each item carries the name you gave it, which is what you match back to a path on disk.
curl -X POST https://operloom.skusol.com/api/products/json-batch-repair/execute \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_CREDENTIAL' \
-d '{"items":[{"name":"a.json","input":"{\"ok\":true,}"}]}'The exact request and response shape is documented on the tool's own page.
Limits worth knowing before you script it
- Items per request
- 25
- Bytes per item
- 8 KB
- Bytes per request
- 48 KB
- Item name
- Up to 120 characters, no slashes or control characters
Chunk a larger job into requests of 25 and keep the file path in the item name. One successful request spends one credit no matter how many items it carried, so full chunks are the cheapest way to run it.
What each item can come back as
- Repaired. The document parsed after removing trailing commas and is returned reformatted.
- Unchanged. It was already valid.
- Not repairable. The remaining error is not one with a single safe fix, and the item reports where parsing stopped instead of guessing.
Next
- Open JSON Batch Repair.
- Read how credits work before buying.
- Testing one document first? JSON Repair is free.