Created
February 24, 2014 14:31
-
-
Save alfredplpl/9189363 to your computer and use it in GitHub Desktop.
This file contains 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 | |
#make a test data. | |
testHash={"A":10,"B":20.0,"C":[30.0,40]} | |
#dump the variable as a file | |
with open("E:/test.json","w") as f: | |
json.dump(testHash,f) | |
#load from a json file | |
#with open("E:/test.json","r") as f: | |
# data=json.load(f) | |
#print data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment