I am using JSON.parse
to parse a json string. It works fine for standard json format string but I doesn't work for some string like below:
'{"filter":{"email":/net/},
"rejected":"[/net/,/net/]"
}'
the problem on this string is that it missing double quote on /net/
which makes JSON.parse
failed. Is there a way to parse this string into json object? Or is there a library to add a double quote on the missing part of this string? I tried a few regex patterns to make up this string but can't find a good solution.