paraqeet.serialization.json_file_serializer.JSONFileSerializer#

class paraqeet.serialization.json_file_serializer.JSONFileSerializer(file)[source]#

Bases: Serializer

Writes data into and read data from JSON files in a human-readable format.

Parameters:

file (str)

__init__(file)[source]#
Parameters:

file (str)

Methods

__init__(file)

load()

Loads and returns the data from JSON file

load_comment()

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()[source]#

Loads and returns the data from JSON file

Return type:

dict

load_comment()[source]#

Loads and returns the comment from the JSON file.

Return type:

str | None

save(data, comment=None)[source]#

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