2014-09-17 21:56:34 +00:00
|
|
|
try:
|
|
|
|
import ujson as json
|
|
|
|
except ImportError:
|
2017-02-14 22:56:22 +00:00
|
|
|
try:
|
|
|
|
import json
|
|
|
|
except ImportError:
|
|
|
|
import sys
|
|
|
|
print("SKIP")
|
|
|
|
sys.exit()
|
2014-09-17 21:56:34 +00:00
|
|
|
|
|
|
|
print(json.dumps(False))
|
|
|
|
print(json.dumps(True))
|
|
|
|
print(json.dumps(None))
|
|
|
|
print(json.dumps(1))
|
|
|
|
print(json.dumps('abc'))
|
2014-09-25 16:35:56 +00:00
|
|
|
print(json.dumps('\x00\x01\x7e'))
|
2014-09-17 21:56:34 +00:00
|
|
|
print(json.dumps([]))
|
|
|
|
print(json.dumps([1]))
|
|
|
|
print(json.dumps([1, 2]))
|
|
|
|
print(json.dumps([1, True]))
|
|
|
|
print(json.dumps(()))
|
|
|
|
print(json.dumps((1,)))
|
|
|
|
print(json.dumps((1, 2)))
|
|
|
|
print(json.dumps((1, (2, 3))))
|
|
|
|
print(json.dumps({}))
|
|
|
|
print(json.dumps({"a":1}))
|
|
|
|
print(json.dumps({"a":(2,[3,None])}))
|
2015-03-14 21:20:58 +00:00
|
|
|
print(json.dumps('"quoted"'))
|
|
|
|
print(json.dumps('space\n\r\tspace'))
|