Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ EscapeString() [2/4]

static void System.Text.Json.JsonWriterHelper.EscapeString ( ReadOnlySpan< byte > value,
Span< byte > destination,
JavaScriptEncoder encoder,
ref int written )
inlinestaticprivate

Definition at line 326 of file JsonWriterHelper.cs.

327 {
328 if (encoder.EncodeUtf8(value, destination, out var _, out var bytesWritten) != 0)
329 {
330 ThrowHelper.ThrowArgumentException_InvalidUTF8(value.Slice(bytesWritten));
331 }
333 }
virtual OperationStatus EncodeUtf8(ReadOnlySpan< byte > utf8Source, Span< byte > utf8Destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock=true)

References System.destination, System.Text.Json.Dictionary, System.Text.Encodings.Web.TextEncoder.EncodeUtf8(), System.Text.Json.ThrowHelper.ThrowArgumentException_InvalidUTF8(), and System.value.

Referenced by System.Text.Json.JsonWriterHelper.EscapeString(), System.Text.Json.JsonWriterHelper.EscapeString(), System.Text.Json.JsonHelpers.EscapeValue(), System.Text.Json.JsonHelpers.GetEscapedPropertyNameSection(), System.Text.Json.Utf8JsonWriter.WriteBase64EscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteBase64EscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteLiteralEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteLiteralEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStartEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStartEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty(), System.Text.Json.Utf8JsonWriter.WriteStringEscapePropertyOnly(), System.Text.Json.Utf8JsonWriter.WriteStringEscapePropertyOnly(), System.Text.Json.Utf8JsonWriter.WriteStringEscapePropertyOrValue(), System.Text.Json.Utf8JsonWriter.WriteStringEscapePropertyOrValue(), System.Text.Json.Utf8JsonWriter.WriteStringEscapePropertyOrValue(), System.Text.Json.Utf8JsonWriter.WriteStringEscapePropertyOrValue(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeValue(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeValue(), System.Text.Json.Utf8JsonWriter.WriteStringEscapeValueOnly(), and System.Text.Json.Utf8JsonWriter.WriteStringEscapeValueOnly().