1"""
2categories: Modules,json
3description: JSON module does not throw exception when object is not serialisable
4cause: Unknown
5workaround: Unknown
6"""
7import json
8
9a = bytes(x for x in range(256))
10try:
11    z = json.dumps(a)
12    x = json.loads(z)
13    print("Should not get here")
14except TypeError:
15    print("TypeError")
16