I am trying to deserialization a Resume which one string too large using the JSON JavaScriptSerializer. I am getting this error.
" Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."
HttpResponseMessage messge = client.GetAsync("ladders/get/d381241a0ad596d4bf02f441e75d1891fcc482e607c751e3978bc0adea6a9d99").Result;
string result = messge.Content.ReadAsStringAsync().Result;
string description = result;
JavaScriptSerializer jsSerializer = new JavaScriptSerializer();
var myobj = jsSerializer.Deserialize<List<List<CandidateResume>>>(description);
This is my class
public class CandidateResume
{
public string name { get; set; }
public string url { get; set; }
public string summary { get; set; }
public string role { get; set; }
public string compensation { get; set; }
public string education { get; set; }
public string expertise { get; set; }
public string years { get; set; }
public string relocation { get; set; }
public string resume { get; set; }
public string resumeExtension { get; set; }
public string resumeMimeType { get; set; }
}
I've added the maxJsonLength property to 2147483644, but it still doesn't work.
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483644"/>
</webServices>
</scripting>
</system.web.extensions>
>>(description);
– Letoncse Feb 06 '15 at 19:01