mirror of
https://github.com/dh1tw/pyhamtools.git
synced 2025-12-06 06:52:00 +01:00
corrected json encoding to utf8
This commit is contained in:
parent
9c227ea70c
commit
0ff3b43688
|
|
@ -695,7 +695,7 @@ class LookupLib(object):
|
|||
if not self._check_html_response(response):
|
||||
raise LookupError
|
||||
|
||||
jsonLookup = json.loads(response.text, encoding='UTF-8')
|
||||
jsonLookup = response.json()
|
||||
lookup = {}
|
||||
|
||||
for item in jsonLookup:
|
||||
|
|
@ -1473,7 +1473,8 @@ class LookupLib(object):
|
|||
Deserialize a JSON into a dictionary
|
||||
"""
|
||||
|
||||
my_dict = json.loads(json_data, encoding='UTF-8')
|
||||
my_dict = json.loads(json_data.decode('utf8').replace("'", '"'),
|
||||
encoding='UTF-8')
|
||||
|
||||
for item in my_dict:
|
||||
if item == const.ADIF:
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ def get_clublog_users(**kwargs):
|
|||
|
||||
zip_file = zipfile.ZipFile(BytesIO(result.content))
|
||||
files = zip_file.namelist()
|
||||
cl_json_unzipped = zip_file.read(files[0])
|
||||
cl_json_unzipped = zip_file.read(files[0]).decode('utf8').replace("'", '"')
|
||||
|
||||
cl_data = json.loads(cl_json_unzipped, encoding='UTF-8')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue