JsonFile

class cgp_generic_utils.files.JsonFile(path)

Bases: cgp_generic_utils.files.File

file object that manipulate a .json file on the file system

classmethod create(path, content=None, **__)

create a json file

Parameters:
  • path (str) – path of the json file
  • content (any) – content of the json file
Returns:

the created json file

Return type:

cgp_generic_utils.files.JsonFile

read()

read the json file

Returns:the content of the json file
Return type:any