Restored JSON output of dicts with non-string keys (#179)

* Restored JSON output of dicts with non-string keys

* Use numpy.integer instead of deprecated numpy.int
This commit is contained in:
s-kuberski 2023-05-19 15:58:56 +02:00 committed by GitHub
parent a5b6f69160
commit 81e4f37934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 7 deletions

View file

@ -249,6 +249,10 @@ def test_json_dict_io():
with pytest.raises(Exception):
jsonio.dump_dict_to_json(od, fname, description=desc)
od = {1: 'test', False: 'True', None: 'None'}
jsonio.dump_dict_to_json(od, fname, description={np.int64(1): np.float64(2.444444)})
jsonio.dump_dict_to_json(od, fname, description=np.float32(2.444444))
os.remove(fname + '.json.gz')