JsonSerializer.SerializeToUtf8Bytes 메서드

정의

오버로드

SerializeToUtf8Bytes(Object, JsonTypeInfo)

제공된 값을 배열로 Byte 변환합니다.

SerializeToUtf8Bytes(Object, Type, JsonSerializerOptions)

지정된 형식의 값을 UTF-8 바이트로 인코딩된 JSON 문자열로 변환합니다.

SerializeToUtf8Bytes(Object, Type, JsonSerializerContext)

제공된 값을 배열로 Byte 변환합니다.

SerializeToUtf8Bytes<TValue>(TValue, JsonSerializerOptions)

제네릭 형식 매개 변수에 지정된 형식의 값을 UTF-8 바이트로 인코딩된 JSON 문자열로 변환합니다.

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

제공된 값을 배열로 Byte 변환합니다.

SerializeToUtf8Bytes(Object, JsonTypeInfo)

Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs

제공된 값을 배열로 Byte 변환합니다.

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()

매개 변수

value
Object

변환할 값입니다.

jsonTypeInfo
JsonTypeInfo

변환할 형식에 대한 메타데이터입니다.

반환

Byte[]

값의 UTF-8 표현입니다.

예외

jsonTypeInfonull입니다.

value 가 의 jsonTypeInfo형식과 일치하지 않습니다.

적용 대상

SerializeToUtf8Bytes(Object, Type, JsonSerializerOptions)

Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs

지정된 형식의 값을 UTF-8 바이트로 인코딩된 JSON 문자열로 변환합니다.

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()

매개 변수

value
Object

변환할 값입니다.

inputType
Type

변환할 value의 형식입니다.

options
JsonSerializerOptions

변환 동작을 컨트롤하는 옵션입니다.

반환

Byte[]

UTF-8 바이트로 인코딩된 값의 JSON 문자열 표현입니다.

예외

inputTypevalue과 호환되지 않는 경우.

inputType이(가) null인 경우

inputType 또는 직렬화 가능한 멤버에 대해 호환되는 JsonConverter가 없습니다.

설명

자세한 내용은 JSON을 직렬화 및 역직렬화하는 방법을 참조하세요.

적용 대상

SerializeToUtf8Bytes(Object, Type, JsonSerializerContext)

Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs

제공된 값을 배열로 Byte 변환합니다.

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()

매개 변수

value
Object

변환할 값입니다.

inputType
Type

변환할 value의 형식입니다.

context
JsonSerializerContext

직렬화 가능한 형식에 대한 메타데이터 공급자입니다.

반환

Byte[]

값의 UTF-8 표현입니다.

예외

inputTypevalue과 호환되지 않는 경우.

inputType이(가) null인 경우

inputType 또는 직렬화 가능한 멤버에 대해 호환되는 JsonConverter가 없습니다.

제공된 context 의 메서드는 GetTypeInfo(Type) 변환할 형식에 대해 를 반환합니다null.

적용 대상

SerializeToUtf8Bytes<TValue>(TValue, JsonSerializerOptions)

Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs

제네릭 형식 매개 변수에 지정된 형식의 값을 UTF-8 바이트로 인코딩된 JSON 문자열로 변환합니다.

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()

형식 매개 변수

TValue

값의 유형입니다.

매개 변수

value
TValue

변환할 값입니다.

options
JsonSerializerOptions

변환 동작을 컨트롤하는 옵션입니다.

반환

Byte[]

UTF-8 바이트로 인코딩된 값의 JSON 문자열 표현입니다.

예외

TValue 또는 직렬화 가능한 멤버에 대해 호환되는 JsonConverter가 없습니다.

설명

자세한 내용은 JSON을 직렬화 및 역직렬화하는 방법을 참조하세요.

적용 대상

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

Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs
Source:
JsonSerializer.Write.ByteArray.cs

제공된 값을 배열로 Byte 변환합니다.

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()

형식 매개 변수

TValue

직렬화할 값의 형식입니다.

매개 변수

value
TValue

변환할 값입니다.

jsonTypeInfo
JsonTypeInfo<TValue>

변환할 형식에 대한 메타데이터입니다.

반환

Byte[]

값의 UTF-8 표현입니다.

예외

TValue 또는 직렬화 가능한 멤버에 대해 호환되는 JsonConverter가 없습니다.

jsonTypeInfonull입니다.

적용 대상