Tuesday, August 5, 2008 5:10 PM
The maximum length of JSON strings, by default is 2097152 characters, which is equivalent to 4 MB of Unicode string data. This should be good enough for most of the web applications. If the size of serialized data you want to send to the client is larger than this default value, you may change it either programmatically or declaratively (in the web.config file of the web site). However, I personally wouldn't go over the 4MB threshold because serializing a large chunk of data across the wire normally causes huge performance penalty. From my experience, you may want to take a serious look at your application design if you need JSON strings longer than 2097152 characters.