JsonEncodedText Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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. |