Skip to content

Commit 07278d8

Browse files
committed
Merge pull request peritus#18 from terryyin/master
Make it support non-English language (like Chinese)
2 parents 72ef871 + fa10302 commit 07278d8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/HttpLibrary/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _with_json(f):
2121
@wraps(f)
2222
def wrapper(self, json_string, *args, **kwargs):
2323
return json.dumps(
24-
f(self, load_json(json_string), *args, **kwargs))
24+
f(self, load_json(json_string), *args, **kwargs), ensure_ascii=False)
2525
return wrapper
2626

2727

tests/json.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,7 @@ Stringify Complex Object
109109

110110
Should Be Equal As Strings ${json_string} {"a": "1", "b": "12", "names": ["First Name", "Family Name", "Email"]}
111111

112+
Get Json Value In Chinese OK
113+
Set Test Variable ${chinese} "中"
114+
${result}= Get Json Value {"foo":${chinese}} /foo
115+
Should Be Equal ${result} ${chinese}

0 commit comments

Comments
 (0)