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_ascii1.
Coverage remained the same at 65.846% when pulling 974d54f393de78ce21bee9897cee8f1ace5813ee on Genzer:master into dbea3db33298da4ec41197b07612c42580e132e4 on stefankoegl:master.
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 modulejson.dump()
governed by a flagensure_ascii
1.For example:
After applying the patch on an empty source file
{}
, this is the output:This commits add a flag
-u|--preserve-unicode
into the jsonpatch CLI to configure the behaviour ofjson.dump
'sensure_ascii
flag.Using the
--preserve-unicode
flag, the final output will print the Unicode characters as-is without any encoding.