0

im having a trouble with my JsonResult of a MVC 5 call. My retorn data are really big and im 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.

And I cant find the property MaxJsonLength in my object JsonResult.

Thanks 4 the help!

Jos
  • 3
  • 1
  • 1
    Possible duplicate of [this](http://stackoverflow.com/questions/39600157/how-to-set-the-maxjsonlength-property) SO question. – Jeroen Heier Apr 05 '17 at 19:04

1 Answers1

0

you can check for MaxJsonLength like below

JavaScriptSerializer serializer = new JavaScriptSerializer();
serializer.MaxJsonLength = Int32.MaxValue;
Nikki
  • 409
  • 1
  • 5
  • 15