Describe the bug
I was trying the json response streaming from openai api and fix it using this library. When the json input was {" it got my program stuck for some reason. After deep investigation, I found it was an infinite loop in this library. Attached below are some screenshots with what's happening and the function that it's happening in. I added some print() in the library code to check what's happening.
To Reproduce
Steps to reproduce the behavior:
Import the library
make your JSON string {"
use the repair_json function from the library
You will have a stuck program with an infinite loop.
Expected behavior
Should throw an error or have an empty object like {}.
Screenshots
Desktop (please complete the following information):
Describe the bug I was trying the json response streaming from openai api and fix it using this library. When the json input was
{"
it got my program stuck for some reason. After deep investigation, I found it was an infinite loop in this library. Attached below are some screenshots with what's happening and the function that it's happening in. I added someprint()
in the library code to check what's happening.To Reproduce Steps to reproduce the behavior:
{"
repair_json
function from the libraryExpected behavior Should throw an error or have an empty object like
{}
.Screenshots
Desktop (please complete the following information):