2019-08-22 06:45:13 +01:00
|
|
|
# test loading from bytes and bytearray (introduced in Python 3.6)
|
|
|
|
|
|
|
|
try:
|
|
|
|
import ujson as json
|
|
|
|
except ImportError:
|
|
|
|
try:
|
|
|
|
import json
|
|
|
|
except ImportError:
|
|
|
|
print("SKIP")
|
|
|
|
raise SystemExit
|
|
|
|
|
2020-03-23 02:26:08 +00:00
|
|
|
print(json.loads(b"[1,2]"))
|
|
|
|
print(json.loads(bytearray(b"[null]")))
|