Skip to content

Commit

Permalink
py39: json compatibility fix
Browse files Browse the repository at this point in the history
The encoding parameter was removed from json.loads()
  • Loading branch information
rcoup committed Nov 16, 2021
1 parent 693a93d commit fdfb94b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kart/serialise_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def json_pack(data):

def json_unpack(bytestring):
"""bytes -> data (any type)"""
return json.loads(bytestring, encoding="utf8")
# The input encoding should be UTF-8, UTF-16 or UTF-32.
return json.loads(bytestring)


def b64encode_str(bytestring):
Expand Down

0 comments on commit fdfb94b

Please sign in to comment.