While working with JSON in getting records beyond a
limit I am getting below exception:
InvalidOperationException / Invalid Object
Error during serialization or deserialization using the JSON
To set maximum limit of your JSON response just go to
your web.config file and do below setting:
<configuration>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="50000000"/>
</webServices>
</scripting>
</system.web.extensions>
</configuration>

Image 1.