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

◆ WriteStringEscapeValue() [2/2]

void System.Text.Json.Utf8JsonWriter.WriteStringEscapeValue ( ReadOnlySpan< char > value,
int firstEscapeIndexVal )
inlineprivate

Definition at line 5275 of file Utf8JsonWriter.cs.

5276 {
5277 char[] array = null;
5278 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndexVal);
5279 Span<char> span = ((maxEscapedLength > 128) ? ((Span<char>)(array = ArrayPool<char>.Shared.Rent(maxEscapedLength))) : stackalloc char[128]);
5280 Span<char> destination = span;
5281 JsonWriterHelper.EscapeString(value, destination, firstEscapeIndexVal, _options.Encoder, out var written);
5283 if (array != null)
5284 {
5286 }
5287 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
void WriteStringByOptions(ReadOnlySpan< char > propertyName, DateTime value)

References System.Text.Json.Utf8JsonWriter._options, System.array, System.destination, System.Text.Json.Dictionary, System.Text.Json.JsonWriterOptions.Encoder, System.Text.Json.JsonWriterHelper.EscapeString(), System.Text.Json.JsonWriterHelper.GetMaxEscapedLength(), System.Buffers.ArrayPool< T >.Shared, System.value, and System.Text.Json.Utf8JsonWriter.WriteStringByOptions().

Referenced by System.Text.Json.Utf8JsonWriter.WriteStringEscape(), and System.Text.Json.Utf8JsonWriter.WriteStringEscape().