Error when load model in gojs

Hi, I have a model which from this.myDiagram.model.toJson():

{ "class": "TreeModel",\n  "nodeDataArray": [\n{"category":"Main","key":"main","name":"xx","department":"xx","class":null,"source":"http://52.83.94.142:8866/image//9/20210906171223268_img103.png","loc":"50 70.8291015625"},\n{"category":"text","text":"设计","class":0,"parent":"main","key":-2,"loc":"202.76142374915398 70.8291015625"},\n{"category":"text","text":"视觉/交互设计","class":1,"parent":-2,"key":-3,"loc":"358.2842712474619 70.8291015625"},\n{"category":"text","text":"视觉设计","class":2,"parent":-3,"key":-4,"loc":"513.8071187457699 70.8291015625"},\n{"category":"icon","class":4,"source":"img/1.9c881058.png","parent":-4,"key":-5,"loc":"655.0685424949238 70.8291015625"}\n]}

When I call this.myDiagram.model = go.Model.fromJson(this.model); it throw error:
Snip20210908_16
Can you help with this, thank you for your time!

The “\n” characters in your string are not valid JSON syntax.

Don’t use the property name “class” in what you pass to Model.fromJson.