pycodestyle
pycodestyle copied to clipboard
Feature: export method to code export nodes and edges as json
It would be very useful if you could export a function in the library that allows us to export the nodes and edges through code, not only through ui (the shareable property on the Svelvet componentet).
Example methods like:
getNodesAsJSON(canvasId) getEdgesAsJSON(canvasId)
example of (dummy)usage showing what such an implementations could look like:
import Svelvet from "svelvet"; import { getNodesAsJSON, getEdgesAsJSON } from 'svelvet'; // these methods could be exported by Svelvet
<Svelvet {...svelvetconfig} bind:canvasId={canvasId} />
{JSON.stringify( getNodesAsJSON(canvasId) )}>
{JSON.stringify( getEdgessAsJSON(canvasId) )}>
Similar #229
+1 It would be very useful to have an import/export feature
Similar #229
@rohanrajpal This is not similar to the requirement of two way binding. Exporting to JSON would allow for programmatic parsing for other requirements eg: NoCode tools etc. Exporting as JSON should be a critical feature, IMO.