JavaScriptSerializer::RecursionLimit Property
Gets or sets the limit for constraining the number of object levels to process.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | 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:
When the JavaScriptSerializer class is deserializing a JSON string.
When the JavaScriptSerializer class is walking an object graph during serialization.
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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.