System.Text.Json.Serialization
Namespace with 32 public types
Classes
JsonConstructorAttribute
When placed on a constructor, indicates that the constructor should be used to create
instances of the type on deserialization.
JsonConverterAttribute
When placed on a property, field, or type, specifies the converter type to use.
JsonDerivedTypeAttribute
When placed on a type declaration, indicates that the specified subtype should be opted into polymorphic serialization.
JsonExtensionDataAttribute
When placed on a property or field of type or
, any properties that do not have a
matching property or field are added during deserialization and written during serialization.
JsonIgnoreAttribute
Prevents a property or field from being serialized or deserialized.
JsonIncludeAttribute
Indicates that the property or field should be included for serialization and deserialization.
JsonNumberHandlingAttribute
When placed on a type, property, or field, indicates what
settings should be used when serializing or deserializing numbers.
JsonPolymorphicAttribute
When placed on a type, indicates that the type should be serialized polymorphically.
JsonPropertyNameAttribute
Specifies the property name that is present in the JSON when serializing and deserializing.
This overrides any naming policy specified by .
JsonPropertyOrderAttribute
Specifies the property order that is present in the JSON when serializing. Lower values are serialized first.
If the attribute is not specified, the default value is 0.
JsonRequiredAttribute
Indicates that the annotated member must bind to a JSON property on deserialization.
JsonSerializableAttribute
Instructs the System.Text.Json source generator to generate source code to help optimize performance
when serializing and deserializing instances of the specified type and types in its object graph.
JsonSourceGenerationOptionsAttribute
Instructs the System.Text.Json source generator to assume the specified
options will be used at run time via .
JsonStringEnumConverter
Converter to convert enums to and from strings.
ReferenceHandler`1
This class defines how the deals with references on serialization and deserialization.
Enumerations
JsonIgnoreCondition
When specified on ,
determines when properties and fields across the type graph are ignored.
When specified on , controls whether
a property or field is ignored during serialization and deserialization. This option
overrides the setting on .
JsonKnownNamingPolicy
The to be used at run time.
JsonNumberHandling
Determines how handles numbers when serializing and deserializing.
The behavior of and is not defined by the JSON specification. Altering the default number handling can potentially produce JSON that cannot be parsed by other JSON implementations.
JsonSourceGenerationMode
The generation mode for the System.Text.Json source generator.
JsonUnknownDerivedTypeHandling
Defines how objects of a derived runtime type that has not been explicitly declared for polymorphic serialization should be handled.
JsonUnknownTypeHandling
Defines how deserializing a type declared as an is handled during deserialization.
Abstract Classes
JsonAttribute
The base class of serialization attributes.
JsonConverter
Converts an object or value to or from JSON.
JsonConverter`1
Converts an object or value to or from JSON.
JsonConverterFactory
Supports converting several types by using a factory pattern.
JsonSerializerContext
Provides metadata about a set of types that is relevant to JSON serialization.
ReferenceHandler
This class defines how the deals with references on serialization and deserialization.
ReferenceResolver
This class defines how the deals with references on serialization and deserialization.
Defines the core behavior of preserving references on serialization and deserialization.
Interfaces
IJsonOnDeserialized
Specifies that the JSON type should have its method called after deserialization occurs.
IJsonOnDeserializing
Specifies that the type should have its method called before deserialization occurs.
IJsonOnSerialized
Specifies that the type should have its method called after serialization occurs.
IJsonOnSerializing
Specifies that the type should have its method called before serialization occurs.