I am parsing a JSON file using C#. Here is what I got from the server:
loadData([
{"id":"id1","nm":"name1"},
{"id":"id2","nm":"name2"},
{"id":"id3","nm":"name3"}
]);
This is not the entire string, as I have deleted some of the values to make it appear more straightforward.
As you can see, this JSON is not parseable because it ends with semicolon (;) and has a bunch of other issues which need to be fixed.
Now that I have this data, is there any workaround I can do on the client side to parse this JSON?
The server gave you more than the JSON file. It gave you
loadData(jsonData);withjsonDatalooking like this :So you will have to parse this to extract the JSON file.