I tried to increase the length of JSON that can be parsed by setting the following config property in Web.config.
<add key="aspnet:MaxJsonDeserializerMembers" value="4194304" />
I am not too sure what the unit of measurement of the value is. Is it in bytes or something else?
The unit of measure is the # of items (key/value pairs) that can be deserialized. If your JSON has 500 members (key/value pairs) and your limit is 400 then it would fail.
http://msdn.microsoft.com/en-us/library/hh975440.aspx
You must be careful making this limit too high. You could easily DOS your server by submitting frequent requests with large JSON payloads and forcing your server to process them. By keeping the number low the server will terminate the request before processing begins.
Based on the source code of JsonValueProviderFactory, I would say the aspnet:MaxJsonDeserializerMembers
refers to a total number of key/value pairs in JSON request, irrespective of whether they are nested or not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With