stefankoegl / python-json-patch

Applying JSON Patches in Python
https://python-json-patch.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
440 stars 96 forks source link

feat(jsondiff): Add support for preserving Unicode characters in jsondiff CLI #145

Closed hirmiura closed 1 year ago

hirmiura commented 1 year ago

Mostly same as https://github.com/stefankoegl/python-json-patch/pull/127. This is also for jsondiff.

Example: t1.json: {"test": "test"} t2.json: {"test": "テスト"}

Without the support:

$ jsondiff t1.json t2.json 
[{"op": "replace", "path": "/test", "value": "\u30c6\u30b9\u30c8"}]

With the support:

$ jsondiff -u t1.json t2.json
[{"op": "replace", "path": "/test", "value": "テスト"}]
stefankoegl commented 1 year ago

Thanks for the contribution :)