Skip to content

Instantly share code, notes, and snippets.

View sanvishal's full-sized avatar
☯️
messing around and finding out

Vishal TK sanvishal

☯️
messing around and finding out
View GitHub Profile
@sanvishal
sanvishal / save-file.py
Created June 22, 2018 09:55 — forked from keithweaver/save-file.py
Save JSON file with Python
import json
def writeToJSONFile(path, fileName, data):
filePathNameWExt = './' + path + '/' + fileName + '.json'
with open(filePathNameWExt, 'w') as fp:
json.dump(data, fp)
# Example
data = {}