Gets or sets the maximum length of JavaScript Object Notation (JSON) strings that are accepted by the JavaScriptSerializer class.
Syntax
CSharp
public int MaxJsonLength { get; set; }VisualBasic
Public Property MaxJsonLength As Integer
ManagedCPlusPlus
public:
int MaxJsonLength {
int get ();
void set (int value);
}JSharp
/** @property */
/** @property */
Value
Return Value
The maximum length of JSON strings. The default is 2097152 characters, which is equivalent to 4 MB of Unicode string data.
Remarks
The value of the MaxJsonLength property only applies when you explicitly create an instance of the JavaScriptSerializer class. Use the jsonSerialization element of the configuration file to set the maximum length for the internal serializer instance that is used by the asynchronous communication layer. For more information about the configuration elements, see Configuring ASP.NET AJAX.
Exceptions
Assembly: System.Web.Extensions (Module: System.Web.Extensions)