Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Unable to read data from go.Model.fromJson(String saved from toJson)

$
0
0

@pritish606 wrote:

Hi ,

Following is the Json String produced by calling method toJson on my model :

currentString =
{ \"class\": \"go.TreeModel\",\n  \"nodeDataArray\": [ \n{\"key\":0, \"text\":\"Mind Map\", \"loc\":\"0 0\"},\n{\"text\":\"idea\", \"parent\":0, \"key\":-2, \"loc\":\"78.22705078125 0\"},\n{\"text\":\"idea\", \"parent\":-2, \"key\":-3, \"loc\":\"128.22705078125 0\"}\n ]}:

Now when i try to load data from this string using :

myDiagram.model = go.Model.fromJson(currentString);

Nothing happens at all whereas when I try to load a normal model , it works.

Please help, this is quite critical as my dissertation is dependent on this very functionality.

Posts: 7

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles