allensdk.config.model.formats.json_description_parser module

class allensdk.config.model.formats.json_description_parser.JsonDescriptionParser[source]

Bases: allensdk.config.model.description_parser.DescriptionParser

log = <logging.Logger object>
read(file_path, description=None, section=None, **kwargs)[source]

Parse a complete or partial configuration.

Parameters:
json_string : string

Input to parse.

description : Description, optional

Where to put the parsed configuration. If None a new one is created.

section : string, optional

Where to put the parsed configuration within the description.

Returns:
Description

The input description with parsed configuration added.

Section is only specified for “bare” objects that are to be added to a section array.
read_string(json_string, description=None, section=None, **kwargs)[source]

Parse a complete or partial configuration.

Parameters:
json_string : string

Input to parse.

description : Description, optional

Where to put the parsed configuration. If None a new one is created.

section : string, optional

Where to put the parsed configuration within the description.

Returns:
Description

The input description with parsed configuration added.

Section is only specified for “bare” objects that are to be added to a section array.
write(filename, description)[source]

Write the description to a JSON file.

Parameters:
description : Description

Object to write.

write_string(description)[source]

Write the description to a JSON string.

Parameters:
description : Description

Object to write.

Returns:
string

JSON serialization of the input.