-
Notifications
You must be signed in to change notification settings - Fork 0
json
jasper-zanjani edited this page Aug 6, 2020
·
1 revision
Parse an open file descriptor
with open('file.json') as f:
data=json.load(f)Deserialize a JSON document rawdata that has been loaded
data = json.loads(rawdata)Write to an open file descriptor
with open("file.json","w") as f:
json.dump(data,f)Specify indentation
with open('file.json','w') as f:
f.write(json.dumps(data, indent=4))- argparse ?
- array ?
- asyncio ?
- bisect ?
- csv ?
- ctypes ?
- curses ?
- datetime ?
- functools ?
- getpass ?
- glob ?
- heapq ?
- http ?
- json ?
- logging ?
- optparse ?
- os ?
- pathlib ?
- platform ?
- pythonnet ?
- random ?
- socket ?
- subprocess ?
- sqlite3 ?
- sys ?
- termcolor ?
- threading ?
- trace ?
- typing ?
- unittest ?
- urllib ?
- venv ?
- weakref ?
- winrm ?