kopia lustrzana https://github.com/micropython/micropython-lib
json: Add simple test.
rodzic
904cfd2e9b
commit
d122838151
|
@ -0,0 +1,13 @@
|
||||||
|
import json
|
||||||
|
|
||||||
|
inp = ['foo', {'bar': ('baz', None, 1, 2)}]
|
||||||
|
print(inp)
|
||||||
|
|
||||||
|
s = json.dumps(inp)
|
||||||
|
print(s)
|
||||||
|
|
||||||
|
outp = json.loads(s)
|
||||||
|
print(outp)
|
||||||
|
|
||||||
|
# Doesn't work because JSON doesn't have tuples
|
||||||
|
#assert inp == outp
|
Ładowanie…
Reference in New Issue