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

◆ ToString()

override string System.Text.Json.Nodes.JsonNode.ToString ( )
inlineinherited

Definition at line 537 of file JsonNode.cs.

538 {
539 if (this is JsonValue)
540 {
542 {
543 return jsonValue.Value;
544 }
545 if (this is JsonValue<JsonElement> { Value: { ValueKind: JsonValueKind.String }, Value: var value2 })
546 {
547 return value2.GetString();
548 }
549 }
550 using PooledByteBufferWriter pooledByteBufferWriter = new PooledByteBufferWriter(16384);
551 using (Utf8JsonWriter writer = new Utf8JsonWriter(pooledByteBufferWriter, new JsonWriterOptions
552 {
553 Indented = true
554 }))
555 {
557 }
558 return JsonHelpers.Utf8GetString(pooledByteBufferWriter.WrittenMemory.ToArray());
559 }
void WriteTo(Utf8JsonWriter writer, JsonSerializerOptions? options=null)

References System.Text.Json.Dictionary, System.Text.Json.JsonHelpers.Utf8GetString(), System.Text.Json.Value, System.writer, and System.Text.Json.Nodes.JsonNode.WriteTo().