Closed didmar closed 2 months ago
0.26.0
It looks like repairing the object leads to escaped double quotes getting an extra backslash.
Run the following snippet:
import json_repair a = '{"foo": "\\"bar\\""}' print(json_repair.loads(a)) # {'foo': '"bar"'} # => OK! b = """{ "items": [ { "foo": "\\"bar\\"" } """ print(json_repair.loads(b)) # {'items': [{'foo': '\\"bar"'}]} # => KO, expected {'items': [{'foo': '"bar"'}]} c = """{ "items": [ { "foo": "\\"bar\\"" } ] }""" print(json_repair.loads(c)) # {'items': [{'foo': '"bar"'}]} # => OK!
No extra backslash in the parsed string
Version of the library
0.26.0
Describe the bug
It looks like repairing the object leads to escaped double quotes getting an extra backslash.
How to reproduce
Run the following snippet:
Expected behavior
No extra backslash in the parsed string