spinetoolbox.spine_io.importers.json_reader

Contains JSONConnector class.

author:
  1. Marin (KTH)
date:

10.2.2020

Module Contents

spinetoolbox.spine_io.importers.json_reader.select_json_file(parent=None)[source]

Launches QFileDialog with .json filter

class spinetoolbox.spine_io.importers.json_reader.JSONConnector[source]

Bases: spinetoolbox.spine_io.io_api.SourceConnection

Template class to read data from another QThread.

DISPLAY_NAME = JSON[source]
OPTIONS[source]
SELECT_SOURCE_UI[source]
connect_to_source(self, source)[source]

saves filepath

Parameters:{str} -- filepath (source) –
disconnect(self)[source]

Disconnect from connected source.

get_tables(self)[source]
file_iterator(self, table, options, max_rows=-1)[source]
get_data_iterator(self, table, options, max_rows=-1)[source]

Return data read from data source table in table. If max_rows is specified only that number of rows.

spinetoolbox.spine_io.importers.json_reader._tabulize_json(obj)[source]
spinetoolbox.spine_io.importers.json_reader._tabulize_json_object(obj)[source]
spinetoolbox.spine_io.importers.json_reader._tabulize_json_array(arr)[source]