gaps.config.JSON5Handler#

class JSON5Handler[source]#

Bases: Handler

JSON5 config file handler.

Methods

dump(config, stream)

Write the config to a stream (JSON5 file).

dumps(config)

Convert the config to a JSON5 string.

load(file_name)

Load the file contents.

loads(config_str)

Parse the JSON5 string into a config dictionary.

write(file_name, data)

Write the data to a file.

Attributes

FILE_EXTENSION

classmethod dump(config, stream)[source]#

Write the config to a stream (JSON5 file).

classmethod dumps(config)[source]#

Convert the config to a JSON5 string.

classmethod loads(config_str)[source]#

Parse the JSON5 string into a config dictionary.

classmethod load(file_name)#

Load the file contents.

classmethod write(file_name, data)#

Write the data to a file.