Skip to content

EZ - JSON provides tools for managing JSON files, simplifying the process of reading, saving and manipulating data stored in JSON format.

Notifications You must be signed in to change notification settings

Chipik0/ez-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

EZ - JSON

EZ - JSON provides tools for managing JSON files, simplifying the process of reading, saving and manipulating data stored in JSON format. This is the simplest module that will simplify working with dictionaries and JSON.

Example usage

You can set the default value that will be returned if there is an error finding the keys.

if __name__ == '__main__':
    json_obj = JSON('NewJson.json', None)
    
    json_obj['Chips1.Chips2'] = 'Chips3'
    json_obj.save()
    print(json_obj)
  • This code example will return a JSON file looking like this:
{
    "Chips1": {
        "Chips2": "Chips3"
    }
}

  • Also, you can delete keys like this:
del json_obj['Chips1.Chips2']

->

{
    "Chips1": {}
}

  • Also you can use "in" operator.
if 'Chips3' in json_obj['Chips1.Chips2']
    ...

About

EZ - JSON provides tools for managing JSON files, simplifying the process of reading, saving and manipulating data stored in JSON format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages