Give me response structure for this tree view graph

Hi I am going to use this simple GoJS Tree View

Can you give me sample or example of response structure so that i can also change my api accroding to this requirement of this tree view?
Please share with me array structure so that i can modify my api and then i will use this sample

In the sample, call myDiagram.model.toJson(), either in the debugger or in some JavaScript code. The resulting string is in JSON-formatted syntax, which is commonplace for web apps. When the server sends a model serialized in this format, you can load it by calling myDiagram.model = go.Model.fromJson(str).

Many samples show the serialized model in this format. Many of those samples also allow editing the text and loading that model, if it was correctly edited.

Can you share with JSON format for this tree-view?Please share with me sample of json

Hey, could you please share with me JSON format for this tree view GoJS Tree View.

I need JSON structure can you provide me if you have example or any sample ?

In my previous reply I told you how you can get that string in that sample or in any other sample.

In a copy of the TreeView sample, where I had the code produce a sample with just ten nodes, I got this diagram:
image

Calling the Model.toJson method (i.e. in this case myDiagram.model.toJson()) produced:

{ "class": "TreeModel",
  "nodeDataArray": [
{"key":0},
{"key":1,"parent":0},
{"key":2,"parent":1},
{"key":3,"parent":1},
{"key":4,"parent":1},
{"key":5,"parent":4},
{"key":6,"parent":1},
{"key":7,"parent":6},
{"key":8,"parent":6},
{"key":9,"parent":8}
]}
1 Like

Thankyou :). I just need your confirmation :)