Class: JsonService

JsonService

Service which will take care of import/export/format JSON data.
GraphService is used to get nodes and edges of the graph because this class owns the core instance of Cytoscape (GraphService#cy).


new JsonService()

Constructor.
Injects an instance of GraphService.

Source:

Methods


createGraphOnImport(data)

Utility method used to create graph by importing JSON text.

Parameters:
Name Type Description
data any

The data of the JSON text

Source:

cytoscapeGraphToGinflowWorkspaceJson(workflowName)

Convert the entire graph data cytoscape into a ginflow JSON representation.

Parameters:
Name Type Description
workflowName string

The name of the workflow

Source:
Returns:

The Ginflow JSON representation

Type
any

graphToJson(workflow, services)

Utility method which format cytoscape graph to JSON object.

Parameters:
Name Type Description
workflow string

The name of the workflow

services any

The services

Source:
Returns:

the JSON data

Type
any