Szerkesztés

Megosztás a következőn keresztül:


JsonEncodedText Struct

Definition

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 readonly struct JsonEncodedText : IEquatable<System.Text.Json.JsonEncodedText>
type JsonEncodedText = struct
Public Structure JsonEncodedText
Implements IEquatable(Of JsonEncodedText)
Inheritance
JsonEncodedText
Implements

Remarks

This type can be used to cache and store known strings used for writing JSON ahead of time by pre-encoding them up front.

Properties

EncodedUtf8Bytes

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

Value

Gets the UTF-16 encoded representation of the pre-encoded JSON text as a String.

Methods

Encode(ReadOnlySpan<Byte>, JavaScriptEncoder)

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

Encode(ReadOnlySpan<Char>, JavaScriptEncoder)

Encodes a specified text value as a JSON string.

Encode(String, JavaScriptEncoder)

Encodes the string text value as a JSON string.

Equals(JsonEncodedText)

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.

GetHashCode()

Returns the hash code for this JsonEncodedText.

ToString()

Converts the value of this instance to a String.

Applies to