🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
from json_repair import repair_json
|
||||
|
||||
|
||||
def _find_unclosed(json_str):
|
||||
"""
|
||||
Identifies the unclosed braces and brackets in the JSON string.
|
||||
@@ -94,4 +95,4 @@ def new_fix_broken_generated_json(json_str: str) -> str:
|
||||
return json_str # 如果有效则按原样返回
|
||||
except json.JSONDecodeError:
|
||||
# 如果无效,则尝试修复它
|
||||
return repair_json(json_str)
|
||||
return repair_json(json_str)
|
||||
|
||||
Reference in New Issue
Block a user