Skip to content

Commit

Permalink
Support Chinese in JSON (#1541) (#1542)
Browse files Browse the repository at this point in the history
Signed-off-by: yah01 <[email protected]>
  • Loading branch information
yah01 authored Jun 16, 2023
1 parent 32301e3 commit 1647277
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymilvus/client/entity_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def entity_to_str_arr(entity, field_info, check=True):


def convert_to_json(obj):
return ujson.dumps(obj).encode(Config.EncodeProtocol)
return ujson.dumps(obj, ensure_ascii=False).encode(Config.EncodeProtocol)


def convert_to_json_arr(objs):
arr = []
for obj in objs:
arr.append(ujson.dumps(obj).encode(Config.EncodeProtocol))
arr.append(ujson.dumps(obj, ensure_ascii=False).encode(Config.EncodeProtocol))
return arr


Expand Down

0 comments on commit 1647277

Please sign in to comment.