micropython: add micropython component
This commit is contained in:
15
components/language/micropython/tests/extmod/ujson_load.py
Normal file
15
components/language/micropython/tests/extmod/ujson_load.py
Normal file
@@ -0,0 +1,15 @@
|
||||
try:
|
||||
from uio import StringIO
|
||||
import ujson as json
|
||||
except:
|
||||
try:
|
||||
from io import StringIO
|
||||
import json
|
||||
except ImportError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
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