From c2819663dd073d39ac9611865877570df7b275c7 Mon Sep 17 00:00:00 2001 From: David Chen Date: Mon, 29 Jan 2024 10:34:36 +0800 Subject: [PATCH] fix #57 by set auto-repair = True by default (#58) --- src/fuzzy_json/decoder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fuzzy_json/decoder.py b/src/fuzzy_json/decoder.py index e135533..14d0e36 100644 --- a/src/fuzzy_json/decoder.py +++ b/src/fuzzy_json/decoder.py @@ -274,7 +274,7 @@ def repair_json(json_str: str) -> str: return state_start(json_str) -def loads(json_str: str, auto_repair: bool = False) -> dict[str, Any]: +def loads(json_str: str, auto_repair: bool = True) -> dict[str, Any]: try: return json.loads(json_str, strict=False) except json.decoder.JSONDecodeError: