fix json reindender for coordinates
This commit is contained in:
parent
949b88389e
commit
a58bf3753d
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ def _preencode(data, magic_marker, in_coords=False, in_groups=False):
|
|||
in_coords=(name == 'coordinates'), in_groups=(name == 'groups'))
|
||||
return data
|
||||
elif isinstance(data, (tuple, list)):
|
||||
if (in_coords and len(data) == 2) or in_groups:
|
||||
if (in_coords and data and isinstance(data[0], (int, float))) or in_groups:
|
||||
return magic_marker+json.dumps(data)+magic_marker
|
||||
else:
|
||||
return tuple(_preencode(value, magic_marker, in_coords) for value in data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue