JsonContent.Create Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
| Nazwa | Opis |
|---|---|
| Create(Object, JsonTypeInfo, MediaTypeHeaderValue) |
Tworzy nowe wystąpienie JsonContent klasy, które będzie zawierać |
| Create(Object, Type, MediaTypeHeaderValue, JsonSerializerOptions) |
Tworzy nowe wystąpienie JsonContent klasy, które będzie zawierać |
| Create<T>(T, MediaTypeHeaderValue, JsonSerializerOptions) |
Tworzy nowe wystąpienie JsonContent klasy, które będzie zawierać |
| Create<T>(T, JsonTypeInfo<T>, MediaTypeHeaderValue) |
Tworzy nowe wystąpienie JsonContent klasy, które będzie zawierać |
Create(Object, JsonTypeInfo, MediaTypeHeaderValue)
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
Tworzy nowe wystąpienie JsonContent klasy, które będzie zawierać inputValue serializowane jako JSON.
public static System.Net.Http.Json.JsonContent Create(object? inputValue, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo, System.Net.Http.Headers.MediaTypeHeaderValue? mediaType = default);
static member Create : obj * System.Text.Json.Serialization.Metadata.JsonTypeInfo * System.Net.Http.Headers.MediaTypeHeaderValue -> System.Net.Http.Json.JsonContent
Public Shared Function Create (inputValue As Object, jsonTypeInfo As JsonTypeInfo, Optional mediaType As MediaTypeHeaderValue = Nothing) As JsonContent
Parametry
- inputValue
- Object
Wartość do serializacji.
- jsonTypeInfo
- JsonTypeInfo
JsonTypeInfo służy do kontrolowania zachowania serializacji.
- mediaType
- MediaTypeHeaderValue
Typ nośnika do użycia dla zawartości.
Zwraca
JsonContent Instancja.
Dotyczy
Create(Object, Type, MediaTypeHeaderValue, JsonSerializerOptions)
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
Tworzy nowe wystąpienie JsonContent klasy, które będzie zawierać inputValue serializowane jako JSON.
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Net.Http.Json.JsonContent Create(object? inputValue, Type inputType, System.Net.Http.Headers.MediaTypeHeaderValue? mediaType = default, System.Text.Json.JsonSerializerOptions? options = default);
public static System.Net.Http.Json.JsonContent Create(object? inputValue, Type inputType, System.Net.Http.Headers.MediaTypeHeaderValue? mediaType = default, System.Text.Json.JsonSerializerOptions? options = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Net.Http.Json.JsonContent Create(object? inputValue, Type inputType, System.Net.Http.Headers.MediaTypeHeaderValue? mediaType = default, System.Text.Json.JsonSerializerOptions? options = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member Create : obj * Type * System.Net.Http.Headers.MediaTypeHeaderValue * System.Text.Json.JsonSerializerOptions -> System.Net.Http.Json.JsonContent
static member Create : obj * Type * System.Net.Http.Headers.MediaTypeHeaderValue * System.Text.Json.JsonSerializerOptions -> System.Net.Http.Json.JsonContent
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member Create : obj * Type * System.Net.Http.Headers.MediaTypeHeaderValue * System.Text.Json.JsonSerializerOptions -> System.Net.Http.Json.JsonContent
Public Shared Function Create (inputValue As Object, inputType As Type, Optional mediaType As MediaTypeHeaderValue = Nothing, Optional options As JsonSerializerOptions = Nothing) As JsonContent
Parametry
- inputValue
- Object
Wartość do serializacji.
- inputType
- Type
Typ wartości do serializacji.
- mediaType
- MediaTypeHeaderValue
Typ nośnika do użycia dla zawartości.
- options
- JsonSerializerOptions
Opcje kontrolowania zachowania podczas serializacji, opcje domyślne to Web.
Zwraca
JsonContent Instancja.
- Atrybuty
Dotyczy
Create<T>(T, MediaTypeHeaderValue, JsonSerializerOptions)
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
Tworzy nowe wystąpienie JsonContent klasy, które będzie zawierać inputValue serializowane jako JSON.
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Net.Http.Json.JsonContent Create<T>(T inputValue, System.Net.Http.Headers.MediaTypeHeaderValue? mediaType = default, System.Text.Json.JsonSerializerOptions? options = default);
public static System.Net.Http.Json.JsonContent Create<T>(T inputValue, System.Net.Http.Headers.MediaTypeHeaderValue? mediaType = default, System.Text.Json.JsonSerializerOptions? options = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Net.Http.Json.JsonContent Create<T>(T inputValue, System.Net.Http.Headers.MediaTypeHeaderValue? mediaType = default, System.Text.Json.JsonSerializerOptions? options = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member Create : 'T * System.Net.Http.Headers.MediaTypeHeaderValue * System.Text.Json.JsonSerializerOptions -> System.Net.Http.Json.JsonContent
static member Create : 'T * System.Net.Http.Headers.MediaTypeHeaderValue * System.Text.Json.JsonSerializerOptions -> System.Net.Http.Json.JsonContent
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member Create : 'T * System.Net.Http.Headers.MediaTypeHeaderValue * System.Text.Json.JsonSerializerOptions -> System.Net.Http.Json.JsonContent
Public Shared Function Create(Of T) (inputValue As T, Optional mediaType As MediaTypeHeaderValue = Nothing, Optional options As JsonSerializerOptions = Nothing) As JsonContent
Parametry typu
- T
Typ wartości do serializacji.
Parametry
- inputValue
- T
Wartość do serializacji.
- mediaType
- MediaTypeHeaderValue
Typ nośnika do użycia dla zawartości.
- options
- JsonSerializerOptions
Opcje kontrolowania zachowania podczas serializacji, opcje domyślne to Web.
Zwraca
JsonContent Instancja.
- Atrybuty
Dotyczy
Create<T>(T, JsonTypeInfo<T>, MediaTypeHeaderValue)
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
- Źródło:
- JsonContent.cs
Tworzy nowe wystąpienie JsonContent klasy, które będzie zawierać inputValue serializowane jako JSON.
public static System.Net.Http.Json.JsonContent Create<T>(T? inputValue, System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> jsonTypeInfo, System.Net.Http.Headers.MediaTypeHeaderValue? mediaType = default);
static member Create : 'T * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T> * System.Net.Http.Headers.MediaTypeHeaderValue -> System.Net.Http.Json.JsonContent
Public Shared Function Create(Of T) (inputValue As T, jsonTypeInfo As JsonTypeInfo(Of T), Optional mediaType As MediaTypeHeaderValue = Nothing) As JsonContent
Parametry typu
- T
Typ wartości do serializacji.
Parametry
- inputValue
- T
Wartość do serializacji.
- jsonTypeInfo
- JsonTypeInfo<T>
JsonTypeInfo służy do kontrolowania zachowania serializacji.
- mediaType
- MediaTypeHeaderValue
Typ nośnika do użycia dla zawartości.
Zwraca
JsonContent Instancja.