JsonEncodedText Структура

Определение

Provides methods to transform UTF-8 or UTF-16 encoded text into a form that is suitable for JSON.Provides methods to transform UTF-8 or UTF-16 encoded text into a form that is suitable for JSON.

public value class JsonEncodedText : IEquatable<System::Text::Json::JsonEncodedText>
public struct JsonEncodedText : IEquatable<System.Text.Json.JsonEncodedText>
type JsonEncodedText = struct
Public Structure JsonEncodedText
Implements IEquatable(Of JsonEncodedText)
Наследование
JsonEncodedText
Реализации

Комментарии

Этот тип можно использовать для кэширования и хранения известных строк, используемых для предварительного написания JSON, предварительно записав их заранее.This type can be used to cache and store known strings used for writing JSON ahead of time by pre-encoding them up front.

Свойства

EncodedUtf8Bytes

Gets the UTF-8 encoded representation of the pre-encoded JSON text.Gets the UTF-8 encoded representation of the pre-encoded JSON text.

Методы

Encode(ReadOnlySpan<Byte>, JavaScriptEncoder)

Encodes a UTF-8 text value as a JSON string.Encodes a UTF-8 text value as a JSON string.

Encode(ReadOnlySpan<Char>, JavaScriptEncoder)

Encodes a specified text value as a JSON string.Encodes a specified text value as a JSON string.

Encode(String, JavaScriptEncoder)

Encodes the string text value as a JSON string.Encodes the string text value as a JSON string.

Equals(JsonEncodedText)

Determines whether this instance and another specified JsonEncodedText instance have the same value.Determines whether this instance and another specified JsonEncodedText instance have the same value.

Equals(Object)

Determines whether this instance and a specified object, which must also be a JsonEncodedText instance, have the same value.Determines whether this instance and a specified object, which must also be a JsonEncodedText instance, have the same value.

GetHashCode()

Returns the hash code for this JsonEncodedText.Returns the hash code for this JsonEncodedText.

ToString()

Converts the value of this instance to a String.Converts the value of this instance to a String.

Применяется к