mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
add more json test cases
This commit is contained in:
parent
59b1c13f35
commit
2f52561709
@ -16,6 +16,15 @@ a = {
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
assert json.loads("1") == 1
|
||||||
|
assert json.loads('"1"') == "1"
|
||||||
|
assert json.loads("0.0") == 0.0
|
||||||
|
assert json.loads("[1, 2]") == [1, 2]
|
||||||
|
assert json.loads("null") == None
|
||||||
|
assert json.loads("true") == True
|
||||||
|
assert json.loads("false") == False
|
||||||
|
assert json.loads("{}") == {}
|
||||||
|
|
||||||
_j = json.dumps(a)
|
_j = json.dumps(a)
|
||||||
_a = json.loads(_j)
|
_a = json.loads(_j)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user