mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
tests/extmod: Add test for ujson.load().
This commit is contained in:
11
tests/extmod/ujson_load.py
Normal file
11
tests/extmod/ujson_load.py
Normal file
@@ -0,0 +1,11 @@
|
||||
try:
|
||||
from uio import StringIO
|
||||
import ujson as json
|
||||
except:
|
||||
from io import StringIO
|
||||
import json
|
||||
|
||||
print(json.load(StringIO('null')))
|
||||
print(json.load(StringIO('"abc\\u0064e"')))
|
||||
print(json.load(StringIO('[false, true, 1, -2]')))
|
||||
print(json.load(StringIO('{"a":true}')))
|
||||
Reference in New Issue
Block a user