v0.0.8
Now you can specify if you want to autosave every changes or not
from jsonwriter import file
file = file('filename.json', autosave=False)
# Let's say i want to add somthing to the file and save it
file.set('name', 'nawaf')
# You have to add file.save()
file.save()
# And that is it, every changes you made to the object will be saved in the file
# By the way if you want to see your changes to the file before saving them you can use
file.content() # {'name': 'nawaf'}
New functions:
# This will work only if you are not using autosave
file.save() # This will save every changes you made
file.remove(key) # This will remove any key from the file
file.clear() # This will remove every key and value in the file
file.content() # This will return the file content or all the changes you made if you are not using autosave
file.keys() # This will return a list of all keys in your file
file.values() # This will return a list of all values in your file