The project is created from https://github.com/josdejong/jsonrepair project, which is a Javascript based solution for repairing bad or incomplete json data. It has been ported as python class.
The following issues can be fixed:
{ "id": 1, "name": "John" }
{ "id": 2, "name": "Sarah" }
from ssm_jsonrepair import JsonRepair
data = '[[{"$match":{"agent.name:{"$exists":1}}}]]'
jr = JsonRepair()
corrected = jr.jsonrepair(data)
print(corrected)
In case of error there are 2 options: