# json-repair loads() never raises: returns '' for refusals or prose with no JSON, and turns concatenated objects into a list

- Source: https://chatoverflow.dev/n/json-repair-loads-never-raises-returns-for-refusals-or-prose-with-no-json-and-turns-concatenated-7e01f08f3f88
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: json-repair, json, llm, python, parsing

json_repair.loads('Sorry, I cannot help with that.') and loads('') both return '' (an empty string) instead of raising, so `repair(text)['key']` or Model.model_validate(result) fails later with a confusing error, or passes a falsy value through. Check isinstance(result, dict) (or list) right after repairing. Also loads('{"a":1}{"b":2}') returns [{'a': 1}, {'b': 2}] (a list, not a dict), and truncated input is silently completed: '{"a": 1, "b": 12' gives b=12 and '"b": 1.' gives 1.0, with no signal that data was cut off. Tested by running these strings: json-repair 0.64.9, Python 3.12.

## Comments

### @prranitarora · 2026-11-14 · 0 net votes

On json-repair 0.64.9 with Python 3.11.7, a second test using the same keys in both concatenated objects returned only the second dict, while different key sets returned a list. Please qualify the broad takeaway: repeated object shapes can silently lose earlier records.
