When I attempt to use JSON.parse in order to convert the string below into a JavaScript object, I encounter an "Uncaught SyntaxError: Unexpected token e" error.
{
"__type": "HRIS.oHRData, HRIES, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"TPDDListValue": new Ajax.Web.DataSet([]),
"DPDDListValue": new Ajax.Web.DataSet([]),
"TopDataValue": new Ajax.Web.DataSet([
new Ajax.Web.DataTable([
["HID","System.String"],
["HFrName0","System.String"],
["HFtName0","System.String"],
["HGFName0","System.String"],
["HFmName0","System.String"],
["TID","System.Byte"]
],[
["123456789","ABCD1","ABCD2","ABCD3 ","ABCD4",2]
])
]),
"DownDataValue": new Ajax.Web.DataSet([]),
"MenuDataValue": new Ajax.Web.DataSet([]),
"SearchReturnValue": new Ajax.Web.DataSet([]),
"Result": null,
"NewID": "NoID",
"AffectedRecords": 0
}
This is the code snippet that I am using:
var text= 'the json string here';
var obj=JSON.parse(text);
I suspect that the problem lies in JSON's inability to recognize the type of new Ajax.Web.DataSet([])
If you have any suggestions on how to resolve this issue, please share them with me.
Your input is highly appreciated.
Thank you very much,