Hi,
I am a GoJS beginner and I want to ask where can I find the JSON file for any diagram
also, if I save a diagram in local storage how can i access all stored files?
thanks in advance
Hi,
I am a GoJS beginner and I want to ask where can I find the JSON file for any diagram
also, if I save a diagram in local storage how can i access all stored files?
thanks in advance
Call myDiagram.model.toJson()
to get the serialized Model as JSON-formatted text. Call Model.fromJson to deserialize such a string into an instance of a Model that you can then assign to Diagram.model.
GoJS does not manage localStorage
at all. Your app has to do that.
does the JSON format stored in a separate file or stored as a variable only?
because when i draw a diagram and save it in local storage I want to read the JSON of the diagram
JSON is just a text formatting convention. So it’s just a text string that you save somewhere and then later load back into memory. Where those strings get saved – who knows? That’s the responsibility of the app.