JsonEncodedText
Provides methods to transform UTF-8 or UTF-16 encoded text into a form that is suitable for JSON.
Gets the UTF-8 encoded representation of the pre-encoded JSON text.
Gets the UTF-16 encoded representation of the pre-encoded JSON text as a String.
Encodes the string text value as a JSON string.
Encodes a specified text value as a JSON string.
public static JsonEncodedText Encode(ReadOnlySpan<byte> utf8Value, JavaScriptEncoder encoder = null)
Encodes a UTF-8 text value as a JSON string.
Determines whether this instance and another specified JsonEncodedText instance have the same value.