Skip to content

Instantly share code, notes, and snippets.

View Naveenkariyappa's full-sized avatar
🎯
Focusing

Naveen Kariyappa Naveenkariyappa

🎯
Focusing
View GitHub Profile
@billroy
billroy / jsonio.py
Created September 21, 2012 13:38
Read/write JSON object from file in python
import simplejson
import json
def put(data, filename):
try:
jsondata = simplejson.dumps(data, indent=4, skipkeys=True, sort_keys=True)
fd = open(filename, 'w')
fd.write(jsondata)
fd.close()
except: