Learn R Programming

cyjShiny (version 1.0.42)

readAndStandardizeJSONStyleFile: Read in a JSON file, extract the selector elements, return JSON

Description

this utility function examines the incoming JSON, returns exactly and only an array of selector objects

Usage

readAndStandardizeJSONStyleFile(filename)

Value

a string with a cytoscape.js JSON graph

Arguments

filename

a json file

Details

there are at least two JSON object structures used to specify style (see function comments in code for more details):

  • simple: an array of selector objects

  • more complex, exported from the Cytoscape desktop application this is also an array of objects, one named "style" which (like the simple format described above) contains an array of selectors.