paraqeet.serialization.json_file_serializer.JSONFileSerializer#
- class paraqeet.serialization.json_file_serializer.JSONFileSerializer(file)#
Bases:
SerializerWrites data into and read data from JSON files in a human-readable format.
- Parameters:
file (str)
- __init__(file)#
- Parameters:
file (str)
Methods
__init__(file)load()Loads and returns the data from JSON file
Loads and returns the comment from the JSON file.
save(data[, comment])Saves the data and the optional comment to the JSON file that was specified in the constructor.
- load()#
Loads and returns the data from JSON file
- Return type:
dict
- load_comment()#
Loads and returns the comment from the JSON file.
- Return type:
str | None
- save(data, comment=None)#
Saves the data and the optional comment to the JSON file that was specified in the constructor.
- Parameters:
data (dict)
comment (str | None)
- Return type:
None