Sending Large Data with JSON



On ASP.NET(v 4.0), there is default limit for JSON serialization and if you are exchanging large amount of data over JSON then you need to set the maximum length of JSON which can be sent/received before/after serialization.

Here is the easiest way to set JSON length for serialization code which you can use in web.config file. This example sets the max length to ~2MB.
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2000000">
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>


Comments

Popular posts from this blog

3 Must Haves of a Status Report

AWS encryption chart (SSE-S3 vs SSE-KMS vs SSE-C)

Configure hosts File in Android