Closed zgrossbart closed 6 years ago
Fix works for me. I did test on both sample data and also original (much more complex) data.
Thank you!
It looks like this all works. I'm going to run through the unit tests a few more times and then deploy. I'm marking this bug closed.
Give JSONDiff the following documents:
a.json:
b.json:
This should result in a diff on line three because the two values of the
xcheck
property don't match. It should also result in the entire value ofcomment
property on a single line.Instead JSONDiff will unescape the new line character with a resulting output that looks like this:
JSONDiff will also report the difference is still on line three which is now incorrect. This is also invalid JSON since JSON strings don't allow unescaped new line characters which is why this character was escaped in the first place.
JSONDiff should show output that looks like this:
It should also still report the diff at line three.
This should work the same way for all of the well known escape characters in the JSON specification. It should also handle escape characters in JSON property names as well as values.