Fallback to json5 loader if json.loads cannot parse complex json str

JSON5 spec is more flexible, try to load using a fast json5 parser if
the stricter json.loads from the standard library can't load the
raw complex json string into a python dictionary/list
This commit is contained in:
Debanjum
2024-11-26 16:16:00 -08:00
parent 70b7e7c73a
commit 8c120a5139
2 changed files with 8 additions and 5 deletions

View File

@@ -88,6 +88,7 @@ dependencies = [
"anthropic == 0.26.1",
"docx2txt == 0.8",
"google-generativeai == 0.8.3",
"pyjson5 == 1.6.7",
]
dynamic = ["version"]