JsonSerializer.SerializeToUtf8Bytes Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Aşırı Yüklemeler
| Name | Description |
|---|---|
| SerializeToUtf8Bytes(Object, JsonTypeInfo) |
Sağlanan değeri bir Byte diziye dönüştürür. |
| SerializeToUtf8Bytes(Object, Type, JsonSerializerOptions) |
Belirtilen türdeki bir değeri UTF-8 bayt olarak kodlanmış bir JSON dizesine dönüştürür. |
| SerializeToUtf8Bytes(Object, Type, JsonSerializerContext) |
Sağlanan değeri bir Byte diziye dönüştürür. |
| SerializeToUtf8Bytes<TValue>(TValue, JsonSerializerOptions) |
Genel tür parametresi tarafından belirtilen türün değerini UTF-8 bayt olarak kodlanmış bir JSON dizesine dönüştürür. |
| SerializeToUtf8Bytes<TValue>(TValue, JsonTypeInfo<TValue>) |
Sağlanan değeri bir Byte diziye dönüştürür. |
SerializeToUtf8Bytes(Object, JsonTypeInfo)
Sağlanan değeri bir Byte diziye dönüştürür.
public:
static cli::array <System::Byte> ^ SerializeToUtf8Bytes(System::Object ^ value, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static byte[] SerializeToUtf8Bytes(object? value, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member SerializeToUtf8Bytes : obj * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> byte[]
Public Function SerializeToUtf8Bytes (value As Object, jsonTypeInfo As JsonTypeInfo) As Byte()
Parametreler
- value
- Object
Dönüştürülecek değer.
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
Değerin UTF-8 gösterimi.
Özel durumlar
jsonTypeInfo, null'e eşittir.
value türüyle jsonTypeInfoeşleşmiyor.
Şunlara uygulanır
SerializeToUtf8Bytes(Object, Type, JsonSerializerOptions)
Belirtilen türdeki bir değeri UTF-8 bayt olarak kodlanmış bir JSON dizesine dönüştürür.
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[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 byte[] SerializeToUtf8Bytes(object? value, Type inputType, System.Text.Json.JsonSerializerOptions? options = default);
public static byte[] SerializeToUtf8Bytes(object? value, Type inputType, 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 byte[] SerializeToUtf8Bytes(object? value, Type inputType, System.Text.Json.JsonSerializerOptions? options = default);
public static byte[] SerializeToUtf8Bytes(object value, Type inputType, System.Text.Json.JsonSerializerOptions options = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<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 SerializeToUtf8Bytes : obj * Type * System.Text.Json.JsonSerializerOptions -> byte[]
static member SerializeToUtf8Bytes : obj * Type * System.Text.Json.JsonSerializerOptions -> byte[]
[<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 SerializeToUtf8Bytes : obj * Type * System.Text.Json.JsonSerializerOptions -> byte[]
Public Function SerializeToUtf8Bytes (value As Object, inputType As Type, Optional options As JsonSerializerOptions = Nothing) As Byte()
Public Shared Function SerializeToUtf8Bytes (value As Object, inputType As Type, Optional options As JsonSerializerOptions = Nothing) As Byte()
Parametreler
- value
- Object
Dönüştürülecek değer.
- inputType
- Type
Dönüştürülecek öğesinin value türü.
- options
- JsonSerializerOptions
Dönüştürme davranışını denetleme seçenekleri.
Döndürülenler
DEĞERIn UTF-8 bayt olarak kodlanmış JSON dize gösterimi.
- Öznitelikler
Özel durumlar
inputType
valueile uyumlu değildir.
inputType, null'e eşittir.
için inputType uyumlu JsonConverter veya serileştirilebilir üyeleri yok.
Açıklamalar
Daha fazla bilgi için bkz. JSON'ı seri hale getirme ve seri durumdan çıkarma.
Şunlara uygulanır
SerializeToUtf8Bytes(Object, Type, JsonSerializerContext)
Sağlanan değeri bir Byte diziye dönüştürür.
public:
static cli::array <System::Byte> ^ SerializeToUtf8Bytes(System::Object ^ value, Type ^ inputType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static byte[] SerializeToUtf8Bytes(object? value, Type inputType, System.Text.Json.Serialization.JsonSerializerContext context);
static member SerializeToUtf8Bytes : obj * Type * System.Text.Json.Serialization.JsonSerializerContext -> byte[]
Public Function SerializeToUtf8Bytes (value As Object, inputType As Type, context As JsonSerializerContext) As Byte()
Parametreler
- value
- Object
Dönüştürülecek değer.
- inputType
- Type
Dönüştürülecek öğesinin value türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
Değerin UTF-8 gösterimi.
Özel durumlar
inputType
valueile uyumlu değildir.
inputType, null'e eşittir.
için inputType uyumlu JsonConverter veya serileştirilebilir üyeleri yok.
GetTypeInfo(Type) Sağlanan context yöntemi, dönüştürülecek türü döndürürnull.
Şunlara uygulanır
SerializeToUtf8Bytes<TValue>(TValue, JsonSerializerOptions)
Genel tür parametresi tarafından belirtilen türün değerini UTF-8 bayt olarak kodlanmış bir JSON dizesine dönüştürür.
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[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 byte[] SerializeToUtf8Bytes<TValue>(TValue value, System.Text.Json.JsonSerializerOptions? options = default);
public static byte[] SerializeToUtf8Bytes<TValue>(TValue value, 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 byte[] SerializeToUtf8Bytes<TValue>(TValue value, System.Text.Json.JsonSerializerOptions? options = default);
public static byte[] SerializeToUtf8Bytes<TValue>(TValue value, System.Text.Json.JsonSerializerOptions options = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<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 SerializeToUtf8Bytes : 'Value * System.Text.Json.JsonSerializerOptions -> byte[]
static member SerializeToUtf8Bytes : 'Value * System.Text.Json.JsonSerializerOptions -> byte[]
[<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 SerializeToUtf8Bytes : 'Value * System.Text.Json.JsonSerializerOptions -> byte[]
Public Function SerializeToUtf8Bytes(Of TValue) (value As TValue, Optional options As JsonSerializerOptions = Nothing) As Byte()
Public Shared Function SerializeToUtf8Bytes(Of TValue) (value As TValue, Optional options As JsonSerializerOptions = Nothing) As Byte()
Tür Parametreleri
- TValue
Değerin türü.
Parametreler
- value
- TValue
Dönüştürülecek değer.
- options
- JsonSerializerOptions
Dönüştürme davranışını denetleme seçenekleri.
Döndürülenler
DEĞERIn UTF-8 bayt olarak kodlanmış JSON dize gösterimi.
- Öznitelikler
Özel durumlar
için TValue uyumlu JsonConverter veya serileştirilebilir üyeleri yok.
Açıklamalar
Daha fazla bilgi için bkz. JSON'ı seri hale getirme ve seri durumdan çıkarma.
Şunlara uygulanır
SerializeToUtf8Bytes<TValue>(TValue, JsonTypeInfo<TValue>)
Sağlanan değeri bir Byte diziye dönüştürür.
public:
generic <typename TValue>
static cli::array <System::Byte> ^ SerializeToUtf8Bytes(TValue value, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static byte[] SerializeToUtf8Bytes<TValue>(TValue value, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member SerializeToUtf8Bytes : 'Value * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> byte[]
Public Function SerializeToUtf8Bytes(Of TValue) (value As TValue, jsonTypeInfo As JsonTypeInfo(Of TValue)) As Byte()
Tür Parametreleri
- TValue
Serileştirecek değerin türü.
Parametreler
- value
- TValue
Dönüştürülecek değer.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
Değerin UTF-8 gösterimi.
Özel durumlar
için TValue uyumlu JsonConverter veya serileştirilebilir üyeleri yok.
jsonTypeInfo, null'e eşittir.