Specifies type name handling options for the JsonSerializer.
Namespace: Newtonsoft.JsonAssembly: Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 4.5.0.0 (4.5.11.15729)
Syntax
| C# |
|---|
[FlagsAttribute] public enum TypeNameHandling |
| Visual Basic |
|---|
<FlagsAttribute> _ Public Enumeration TypeNameHandling |
| Visual C++ |
|---|
[FlagsAttribute] public enum class TypeNameHandling |
Members
| Member name | Value | Description | |
|---|---|---|---|
| None | 0 | Do not include the .NET type name when serializing types. | |
| Objects | 1 | Include the .NET type name when serializing into a JSON object structure. | |
| Arrays | 2 | Include the .NET type name when serializing into a JSON array structure. | |
| All | 3 | Always include the .NET type name when serializing. | |
| Auto | 4 | Include the .NET type name when the type of the object being serialized is not the same as its declared type. |