Thank you for creating the best python library for parsing messy json on the web! :)
Thought you might find it interesting that my use case is if you are using an ai chatbot like chatgpt to generate json, it often adds random text before, after or in the json, and is just generally not very respectful of the json spec lol. Also sometimes it gets cutoff in generating json by the context limit so you are left with half of a json object with all the closing brackets missing.
So far dirtyjson has done a great job of handling almost all of this. Only suggestion might be if there was some extra handling around half cutoff json blobs and a best effort attempt to try and turn it into a valid json object.
There is a npm module that focuses more on fixing badly terminated json, might offer some inspiration if you are interested:
https://github.com/josdejong/jsonrepair
Overall mostly just wanted to say thanks! I was trying to write regex to parse out the json and was tearing my hair out but dirtyjson handled most of my problems on the first try.
Thank you for creating the best python library for parsing messy json on the web! :)
Thought you might find it interesting that my use case is if you are using an ai chatbot like chatgpt to generate json, it often adds random text before, after or in the json, and is just generally not very respectful of the json spec lol. Also sometimes it gets cutoff in generating json by the context limit so you are left with half of a json object with all the closing brackets missing.
So far dirtyjson has done a great job of handling almost all of this. Only suggestion might be if there was some extra handling around half cutoff json blobs and a best effort attempt to try and turn it into a valid json object.
There is a npm module that focuses more on fixing badly terminated json, might offer some inspiration if you are interested: https://github.com/josdejong/jsonrepair
Overall mostly just wanted to say thanks! I was trying to write regex to parse out the json and was tearing my hair out but dirtyjson handled most of my problems on the first try.