JsonContent.Create Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Túlterhelések
| Name | Description |
|---|---|
| Create(Object, JsonTypeInfo, MediaTypeHeaderValue) |
Létrehoz egy új példányt az JsonContent osztályból, amely a |
| Create(Object, Type, MediaTypeHeaderValue, JsonSerializerOptions) |
Létrehoz egy új példányt az JsonContent osztályból, amely a |
| Create<T>(T, MediaTypeHeaderValue, JsonSerializerOptions) |
Létrehoz egy új példányt az JsonContent osztályból, amely a |
| Create<T>(T, JsonTypeInfo<T>, MediaTypeHeaderValue) |
Létrehoz egy új példányt az JsonContent osztályból, amely a |
Create(Object, JsonTypeInfo, MediaTypeHeaderValue)
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
Létrehoz egy új példányt az JsonContent osztályból, amely a inputValue szerializáltat JSON-ként fogja tartalmazni.
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
Paraméterek
- inputValue
- Object
A szerializálandó érték.
- jsonTypeInfo
- JsonTypeInfo
A szerializálási viselkedés szabályozásához használt JsonTypeInfo.
- mediaType
- MediaTypeHeaderValue
A tartalomhoz használandó médiatípus.
Válaszok
Egy JsonContent példány.
A következőre érvényes:
Create(Object, Type, MediaTypeHeaderValue, JsonSerializerOptions)
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
Létrehoz egy új példányt az JsonContent osztályból, amely a inputValue szerializáltat JSON-ként fogja tartalmazni.
[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
Paraméterek
- inputValue
- Object
A szerializálandó érték.
- inputType
- Type
A szerializálandó érték típusa.
- mediaType
- MediaTypeHeaderValue
A tartalomhoz használandó médiatípus.
- options
- JsonSerializerOptions
A szerializálás során a viselkedés szabályozására vonatkozó beállítások az alapértelmezett beállítások Web.
Válaszok
Egy JsonContent példány.
- Attribútumok
A következőre érvényes:
Create<T>(T, MediaTypeHeaderValue, JsonSerializerOptions)
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
Létrehoz egy új példányt az JsonContent osztályból, amely a inputValue szerializáltat JSON-ként fogja tartalmazni.
[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
Típusparaméterek
- T
A szerializálandó érték típusa.
Paraméterek
- inputValue
- T
A szerializálandó érték.
- mediaType
- MediaTypeHeaderValue
A tartalomhoz használandó médiatípus.
- options
- JsonSerializerOptions
A szerializálás során a viselkedés szabályozására vonatkozó beállítások az alapértelmezett beállítások Web.
Válaszok
Egy JsonContent példány.
- Attribútumok
A következőre érvényes:
Create<T>(T, JsonTypeInfo<T>, MediaTypeHeaderValue)
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
- Forrás:
- JsonContent.cs
Létrehoz egy új példányt az JsonContent osztályból, amely a inputValue szerializáltat JSON-ként fogja tartalmazni.
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
Típusparaméterek
- T
A szerializálandó érték típusa.
Paraméterek
- inputValue
- T
A szerializálandó érték.
- jsonTypeInfo
- JsonTypeInfo<T>
A szerializálási viselkedés szabályozásához használt JsonTypeInfo.
- mediaType
- MediaTypeHeaderValue
A tartalomhoz használandó médiatípus.
Válaszok
Egy JsonContent példány.