Provides a type resolver for managed types.
Syntax
CSharp
VisualBasic
ManagedCPlusPlus
JSharp
Members
Remarks
This type resolver can be used with the JavaScriptSerializer class to include in the serialized JavaScript Object Notation (JSON) string the assembly-qualified name of any managed type that requires custom type metadata.
The SimpleTypeResolver class enables you to serialize managed types as JSON while retaining the managed type definition for custom types.
To create an instance of the JavaScriptSerializer class that uses a type resolver, you must use the JavaScriptSerializerNew(JavaScriptTypeResolver) constructor.
Examples
The following example demonstrates how to use the SimpleTypeResolver class and shows the resulting serialized strings by using different type resolvers.
Permissions
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand. Associated enumeration: Minimal.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: InheritanceDemand. Associated enumeration: Minimal.
Inheritance Hierarchy
Assembly: System.Web.Extensions (Module: System.Web.Extensions)