summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/ujson_loads_bytes.py
blob: 3ee87bbcd582e66baa5a866e4f5d564c62d48e7a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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

print(json.loads(b"[1,2]"))
print(json.loads(bytearray(b"[null]")))