summaryrefslogtreecommitdiff
path: root/tests/extmod/ujson_dump.py
blob: c80e533ed7b7eba6c045218ba63ac0201090fffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
try:
    from uio import StringIO
    import ujson as json
except:
    try:
        from io import StringIO
        import json
    except ImportError:
        print("SKIP")
        raise SystemExit

s = StringIO()
json.dump(False, s)
print(s.getvalue())

s = StringIO()
json.dump({"a": (2, [3, None])}, s)
print(s.getvalue())