Files
micropython/tests/cpydiff/modules_json_nonserializable.py
Christian Clauss dc2fcfcc55 all: Upgrade to ruff v0.9.6.
Signed-off-by: Christian Clauss <cclauss@me.com>
2025-02-25 13:02:49 +01:00

14 lines
273 B
Python

"""
categories: Modules,json
description: JSON module does not throw exception when object is not serialisable
cause: Unknown
workaround: Unknown
"""
import json
try:
print(json.dumps(b"shouldn't be able to serialise bytes"))
except TypeError:
print("TypeError")