{
"shapes":[{"id":"A","cursor":"pointer","visual":null,"x":69.25,"y":50},{"name":"Right"},{"name":"Auto"}],"width":10,"height":10},"undoable":true}],
"connections":[{"id":"8Op6PApGWW","selectable":true,"serializable":true,"from":{"shapeId":"A"},"toX":null,"toY":null,"to":{"shapeId":"B"}}]
},
This is my json data.
I have to deserialize the data into an array format so i can access the from and to value of connections.
like var fromid=connections[0].from;
There are more than one shape and connections.
What I have tried is:
string jsonString = diagram.ResponseData.diagramJson;
JArray jsondata = (JArray)JsonConvert.DeserializeObject(jsonString);
But It will throw an error.
{"Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Newtonsoft.Json.Linq.JArray'."}
Is anything wrong while deserializing.

Guest UserRank #816 · 2.8K reputationPosted May 7, 2020, 2:42 AM EDT
Mohd Taufeeque57 reputationPosted May 7, 2020, 3:02 AM EDT
Jefferson S. MottaRank #207 · 11.7K reputationPosted May 13, 2020, 1:47 AM EDT
Guest UserRank #816 · 2.8K reputationPosted May 13, 2020, 2:48 AM EDT