Custom name for nodeDataArray

Hi,
I want to make a custom changes in diagram model Json. where want to change the nodeDataArray and linkDataArray as a custom name from the diagram model JSON. so dynamically while generating JSON it will take name what I will give custom. so how I can make it. any way to make it possible?

It would have been helpful if you had given some code examples to demonstrate what you wanted.

As it is I can only guess that you want to set those model properties whose names end in “…Property”.

go.js genereate json like:
{ "class": "go.GraphLinksModel", "name": "Example", "nodeDataArray": [ {"key":1, "geo":"", "color":"blue", "type":"simple", "loc":"-2999.038916015625006"} ], "linkDataArray": [ ] }

so instead of this json it sholud generate like : { "class": "go.GraphLinksModel", "name": "Example", "nodes": [ {"key":1, "geo":"", "color":"blue", "type":"simple", "loc":"-299 9.038916015625006"}], "links": [ ] }

so here instead of property name “nodeDataArray” and “linkDataArray” need a name like “nodes” and “links”

Sorry, but the properties of the model are fixed.

It is only the properties of the model data that you can control. For example in your data, all of the properties there are application-specific properties (presumably used by Bindings) except for “key”.

That property is clearly being used by the model to index the node data objects. That name is determined by the Model.nodeKeyProperty property: Model | GoJS API. Of course its default value is “key”.

An example of using a different property name for the key value is the State Chart sample: State Chart

Anyway, even though the Model properties are unchangeable, that doesn’t mean you can’t change the text produced by Model.toJson.

yes we can change Model Json text, but as you clearly says we cant change properties of the model.
Thanks for your time.