feat: add json test
This commit is contained in:
11
json_test.py
Normal file
11
json_test.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import json
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
x = '{"name": "hatter", "age": 18}'
|
||||||
|
y = json.loads(x)
|
||||||
|
z = json.dumps(y, indent=4, sort_keys=True)
|
||||||
|
print(x)
|
||||||
|
print(y)
|
||||||
|
print(z)
|
||||||
Reference in New Issue
Block a user