summaryrefslogtreecommitdiff
path: root/tests/cpydiff/modules_json_nonserializable.py
blob: ffe523786f50186b5fe7802b220afd960b87b4e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""
categories: Modules,json
description: JSON module does not throw exception when object is not serialisable
cause: Unknown
workaround: Unknown
"""
import json

a = bytes(x for x in range(256))
try:
    z = json.dumps(a)
    x = json.loads(z)
    print("Should not get here")
except TypeError:
    print("TypeError")