JavaScriptSerializer::RecursionLimit Property


Gets or sets the limit for constraining the number of object levels to process.

Namespace:   System.Web.Script.Serialization
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

property int RecursionLimit {
	int get();
	void set(int value);

Property Value

Type: System::Int32

The number of object levels. The default is 100.

Exception Condition

The property is set to a value that is less than one.

The RecursionLimit property refers to the number of levels in the object hierarchy that JavaScriptSerializer will process in the following cases:

The value of RecursionLimit applies only when you explicitly create an instance of the JavaScriptSerializer class. Use the jsonSerialization element of the configuration file to set the number of object levels to process for the internal serializer instance that is used by the asynchronous communication layer. For more information about the configuration elements for serialization, see How to: Configure ASP.NET Services in Microsoft Ajax.

.NET Framework
Available since 3.5
Return to top