Short answer, use eval in a line like: var ds = eval (responseText) ;.
I am using Microsoft.Web.Preview.dll instead of Newtonsoft. I feel Newtonsoft is a bit more code than Microsoft. And it sends you a string, not a JSON object. If at Microsoft you do not need to write all this additional code. Download Microsoft.Web.Preview.dll (called ASP.NET Futures ). Add the following to your web.config:
<system.web.extensions> <scripting> <webServices> <jsonSerialization maxJsonLength="33554432"> <converters> <add name="DataSetConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter, Microsoft.Web.Preview"/> <add name="DataRowConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter, Microsoft.Web.Preview"/> <add name="DataTableConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter, Microsoft.Web.Preview"/> </converters> </jsonSerialization> </webServices> </scripting> </system.web.extensions>
user154901
source share