Method GetJsonContent
GetJsonContent<T>(JsonTypeInfo<T>)
Deserializes the request body into an object of type T using the provided JsonTypeInfo<T>.
public T? GetJsonContent<T>(JsonTypeInfo<T> typeInfo)
Parameters
typeInfoJsonTypeInfo<T>The JsonTypeInfo<T> to use for deserialization.
Returns
- T
The deserialized object, or
nullif the request body is empty.
Type Parameters
TThe type of the object to deserialize into.
GetJsonContent<T>(JsonSerializerOptions?)
Deserializes the request body into an object of type T using the provided JsonSerializerOptions.
[RequiresDynamicCode("JSON deserialization without a type info may require types that cannot be statically analyzed.")]
[RequiresUnreferencedCode("JSON deserialization without a type info may require types that cannot be statically analyzed.")]
public T? GetJsonContent<T>(JsonSerializerOptions? jsonOptions = null)
Parameters
jsonOptionsJsonSerializerOptionsThe JsonSerializerOptions to use for deserialization.
Returns
- T
The deserialized object, or
nullif the request body is empty.
Type Parameters
TThe type of the object to deserialize into.
GetJsonContent<T>()
Deserializes the request body into an object of type T using the default
JsonSerializerOptions from DefaultJsonSerializerOptions.
[RequiresDynamicCode("JSON deserialization without a type info may require types that cannot be statically analyzed.")]
[RequiresUnreferencedCode("JSON deserialization without a type info may require types that cannot be statically analyzed.")]
public T? GetJsonContent<T>()
Returns
- T
The deserialized object, or
nullif the request body is empty.
Type Parameters
TThe type of the object to deserialize into.
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語