SelectedSolutionManagement / jsonrepair

1 stars 0 forks source link

Json Repair

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:

Usage:

from ssm_jsonrepair import JsonRepair

data = '[[{"$match":{"agent.name:{"$exists":1}}}]]'
jr = JsonRepair()
corrected = jr.jsonrepair(data)
print(corrected)

Error handling

In case of error there are 2 options: