Modules.jsonio_lib

Wraps araound the json and the json schema module. It also converts JSON and JSON schema into appropriate data structures for Python and QT.

Functions

decode_function(json_path)

Wrapper for the JSONDecoder function.

py_to_tree(input_dict, meta_dict, return_tree)

takes a dict generated either from a schema or a JSON and a reference dict from a schema and builds the tree model needed for the TreeView.

schema_to_py_gen(decoded_schema[, mode])

A function generating a blank JSON-like python structure from the schema.

tree_to_py(array_of_tree_nodes)

converts the tree back to a nested dict.

type_translation(typecasted_str)

a small helper function for simplifying type guessing for a JSON that does not have a proper schema.

validator_files(json_path, json_schema_path)

The validator function shall wrap around json.load and validate a JSON file against a Schema file.

validator_vars(json_str, json_schema_path)

Similarly to validator_files, but instead with a string representation of the JSON