JSONManipulator package

Submodules

JSONManipulator.exceptions module

The JSONManipulator’s exceptions.

exception JSONManipulator.exceptions.NoKeyAndDesc

Bases: Exception

Raised when a user has entered neither key nor desc.

exception JSONManipulator.exceptions.NotSupportedJSONFile

Bases: Exception

Raised when the JSON file’s structure does not confront to [{…},{…},…].

Module contents

NAME
JSONManipulator.
DESCRIPTION
A Python library to manipulate objects in JSON files.
PACKAGE CONTENTS

set_up(full_path): initially set up the JSON file.

GetInformation(value, full_path, levenshtein=1.0, key=None, desc=None): retrieve information about particular objects.

ChangeValue(value, full_path, levenshtein=1.0, key=None, desc=None): change values of particular objects in the JSON file.

AddObject(full_path): add a new object to the JSON file.

DeleteObject(value, full_path, levenshtein=1.0, key=None, desc=None): delete particular objects in the JSON file.

AddKey(full_path): add a new key to each object in the JSON file.

ChangeAllValues(value, full_path): change values of all objects in the JSON file.