| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Add support for preserving Unicode characters in jsonpatch CLI | Genzer Hawker | 2021-03-03 | 1 | -3/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the JSON content contains some Unicode characters, the jsonpatch final output will encode the Unicode character using ASCII (i.e `\u0394`). This behaviour comes from the module `json.dump()` governed by a flag `ensure_ascii`[1]. For example: ```json /* patch.json */ [{ "op": "add", "path": "/SomeUnicodeSamples", "value": "𝒞𝘋𝙴𝓕ĢȞỈ𝕵 đ áê 🤩 äÄöÖüÜß" }] ``` After applying the patch on an empty source file `{}`, this is the output: ```json {"SomeUnicodeSamples": "\ud835\udc9e\ud835\ude0b...\u00fc\u00dc\u00df"} ``` This commit adds a flag `-u|--preserve-unicode` in the jsonpatch CLI to configure the behaviour of `json.dump`'s `ensure_ascii` flag. Using the `--preserve-unicode` flag, the cli will print the Unicode characters as-is without any encoding. [1]: https://docs.python.org/3/library/json.html#basic-usage | ||||
| * | Remove ununsed imports and variables | Hugo | 2018-01-16 | 1 | -1/+0 |
| | | |||||
| * | If there is no diff print nothing; exit 1 if a diff is found (#53) | Greg Cockburn | 2016-10-02 | 1 | -2/+3 |
| | | | | if there is no diff print nothing, and exit 1 if a diff is found | ||||
| * | note why we use the same directory | Matt Behrens | 2014-02-04 | 1 | -1/+2 |
| | | |||||
| * | add commentary and replace tabs with spaces | Matt Behrens | 2014-02-04 | 1 | -3/+33 |
| | | |||||
| * | add --backup flag and attempt to address various exceptions that may be raised | Matt Behrens | 2014-01-14 | 1 | -5/+25 |
| | | |||||
| * | add in-place patching and patch read from stdin. enables use of | Matt Behrens | 2013-12-12 | 1 | -4/+17 |
| | | | | | | | | | | | jsonpatch in a shell script like so: cat <<EOT | jsonpatch -i a.json [{"path": "/foo", "value": "baz", "op": "replace"}] EOT which will edit a.json in-place and leave a backup in a.json.orig. | ||||
| * | typo | Stefan Kögl | 2013-10-12 | 1 | -1/+1 |
| | | |||||
| * | add "jsonpatch" commandline utility | Stefan Kögl | 2013-10-11 | 1 | -0/+42 |
| | | |||||
| * | add "jsondiff" commandline utility | Stefan Kögl | 2013-10-11 | 1 | -0/+39 |
