JsonSerializer.SerializeToUtf8Bytes Yöntem

Tanım

Aşırı Yüklemeler

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)

Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs

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

Byte[]

Değerin UTF-8 gösterimi.

Özel durumlar

jsonTypeInfo, null değeridir.

value türüyle jsonTypeInfoeşleşmiyor.

Şunlara uygulanır

SerializeToUtf8Bytes(Object, Type, JsonSerializerOptions)

Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs

Belirtilen türdeki bir değeri UTF-8 bayt olarak kodlanmış bir JSON dizesine dönüştürür.

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);
static member SerializeToUtf8Bytes : obj * Type * System.Text.Json.JsonSerializerOptions -> byte[]
Public Shared Function SerializeToUtf8Bytes (value As Object, inputType As Type, Optional options As JsonSerializerOptions = Nothing) As Byte()
Public 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

Byte[]

Değerin UTF-8 bayt olarak kodlanmış JSON dize gösterimi.

Özel durumlar

inputType ile valueuyumlu değildir.

inputType, null değeridir.

için inputType uyumlu JsonConverter veya seri hale getirilebilir üyeleri yok.

Açıklamalar

Daha fazla bilgi için bkz. JSON'u seri hale getirme ve seri durumdan çıkarma.

Şunlara uygulanır

SerializeToUtf8Bytes(Object, Type, JsonSerializerContext)

Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs

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

Seri hale getirilebilir türler için bir meta veri sağlayıcısı.

Döndürülenler

Byte[]

Değerin UTF-8 gösterimi.

Özel durumlar

inputType ile valueuyumlu değildir.

inputType, null değeridir.

için inputType uyumlu JsonConverter veya seri hale getirilebilir üyeleri yok.

GetTypeInfo(Type) Sağlanan context yöntemi, dönüştürülecek tür için döndürürnull.

Şunlara uygulanır

SerializeToUtf8Bytes<TValue>(TValue, JsonSerializerOptions)

Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs

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.

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);
static member SerializeToUtf8Bytes : 'Value * System.Text.Json.JsonSerializerOptions -> byte[]
Public Shared Function SerializeToUtf8Bytes(Of TValue) (value As TValue, Optional options As JsonSerializerOptions = Nothing) As Byte()
Public 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

Byte[]

Değerin UTF-8 bayt olarak kodlanmış JSON dize gösterimi.

Özel durumlar

için TValue uyumlu JsonConverter veya seri hale getirilebilir üyeleri yok.

Açıklamalar

Daha fazla bilgi için bkz. JSON'u seri hale getirme ve seri durumdan çıkarma.

Şunlara uygulanır

SerializeToUtf8Bytes<TValue>(TValue, JsonTypeInfo<TValue>)

Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs
Kaynak:
JsonSerializer.Write.ByteArray.cs

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

Byte[]

Değerin UTF-8 gösterimi.

Özel durumlar

için TValue uyumlu JsonConverter veya seri hale getirilebilir üyeleri yok.

jsonTypeInfo, null değeridir.

Şunlara uygulanır