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

◆ WriteNumberEscapeProperty() [9/10]

void System.Text.Json.Utf8JsonWriter.WriteNumberEscapeProperty ( ReadOnlySpan< char > propertyName,
long value,
int firstEscapeIndexProp )
inlineprivate

Definition at line 2715 of file Utf8JsonWriter.cs.

2716 {
2717 char[] array = null;
2718 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp);
2719 Span<char> span = ((maxEscapedLength > 128) ? ((Span<char>)(array = ArrayPool<char>.Shared.Rent(maxEscapedLength))) : stackalloc char[128]);
2720 Span<char> destination = span;
2721 JsonWriterHelper.EscapeString(propertyName, destination, firstEscapeIndexProp, _options.Encoder, out var written);
2723 if (array != null)
2724 {
2726 }
2727 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
void WriteNumberByOptions(ReadOnlySpan< char > propertyName, decimal 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.WriteNumberByOptions().