<PackageReference Include="System.Text.Json" Version="6.0.9" />

JsonWriterHelper

static class JsonWriterHelper
public const int LastAsciiCharacter = 127

public static void EscapeString(ReadOnlySpan<byte> value, Span<byte> destination, int indexOfFirstByteToEscape, JavaScriptEncoder encoder, out int written)

public static void EscapeString(ReadOnlySpan<char> value, Span<char> destination, int indexOfFirstByteToEscape, JavaScriptEncoder encoder, out int written)

public static int GetMaxEscapedLength(int textLength, int firstIndexToEscape)

public static int NeedsEscaping(ReadOnlySpan<byte> value, JavaScriptEncoder encoder)

public static int NeedsEscaping(ReadOnlySpan<char> value, JavaScriptEncoder encoder)

public static OperationStatus ToUtf8(ReadOnlySpan<byte> utf16Source, Span<byte> utf8Destination, out int bytesConsumed, out int bytesWritten)

Converts a span containing a sequence of UTF-16 bytes into UTF-8 bytes. This method will consume as many of the input bytes as possible. On successful exit, the entire input was consumed and encoded successfully. In this case, bytesConsumed will be equal to the length of the utf16Source and bytesWritten will equal the total number of bytes written to the utf8Destination.

public static void TrimDateTimeOffset(Span<byte> buffer, out int bytesWritten)

public static void ValidateBytes(ReadOnlySpan<byte> bytes)

public static void ValidateDouble(double value)

public static void ValidateProperty(ReadOnlySpan<byte> propertyName)

public static void ValidateProperty(ReadOnlySpan<char> propertyName)

public static void ValidatePropertyAndBytes(ReadOnlySpan<char> propertyName, ReadOnlySpan<byte> bytes)

public static void ValidatePropertyAndBytes(ReadOnlySpan<byte> propertyName, ReadOnlySpan<byte> bytes)

public static void ValidatePropertyAndValue(ReadOnlySpan<char> propertyName, ReadOnlySpan<byte> value)

public static void ValidatePropertyAndValue(ReadOnlySpan<byte> propertyName, ReadOnlySpan<char> value)

public static void ValidatePropertyAndValue(ReadOnlySpan<byte> propertyName, ReadOnlySpan<byte> value)

public static void ValidatePropertyAndValue(ReadOnlySpan<char> propertyName, ReadOnlySpan<char> value)

public static void ValidateSingle(float value)

public static void ValidateValue(ReadOnlySpan<byte> value)

public static void ValidateValue(ReadOnlySpan<char> value)

public static void WriteDateTimeOffsetTrimmed(Span<byte> buffer, DateTimeOffset value, out int bytesWritten)

public static void WriteDateTimeTrimmed(Span<byte> buffer, DateTime value, out int bytesWritten)

public static void WriteIndentation(Span<byte> buffer, int indent)