Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sadeghi85 committed Oct 9, 2023
1 parent 7169c25 commit bf3570b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion title.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,15 @@ def make_title(array_input, type):
try:
# json_params = json.loads(json_string)
json_params = json.JSONDecoder(strict=False).decode(
json.dumps(ast.literal_eval(json_string))
json.dumps(
ast.literal_eval(
re.sub(
r":\s*(?<!['\"])([^'\"]+?)['\"]?\s*(?=[,\n}])",
r": '\1'",
json_string,
)
)
)
)

for k, v in json_params.items():
Expand Down

0 comments on commit bf3570b

Please sign in to comment.