mirror of
https://github.com/micropython/micropython.git
synced 2025-09-07 10:20:52 +02:00
14 lines
273 B
Python
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")
|