Last active
March 30, 2020 15:29
-
-
Save psanzay/33722f37f38cb5346ae284cc4a35852c to your computer and use it in GitHub Desktop.
python serialize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
# open file for storing data | |
f = open("data.json", w) | |
# create object | |
person = {"name": "test", ...} | |
# store in file | |
f.write(json.dumps(person)) | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment