Utf8JsonWriter 构造函数

定义

重载

名称 说明
Utf8JsonWriter(IBufferWriter<Byte>, JsonWriterOptions)

使用指定的IBufferWriter<T>实例初始化类的新实例Utf8JsonWriter,以将输出写入到自定义选项和自定义选项。

Utf8JsonWriter(Stream, JsonWriterOptions)

使用指定的流将输出写入和自定义选项初始化类的新实例 Utf8JsonWriter

Utf8JsonWriter(IBufferWriter<Byte>, JsonWriterOptions)

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

使用指定的IBufferWriter<T>实例初始化类的新实例Utf8JsonWriter,以将输出写入到自定义选项和自定义选项。

public Utf8JsonWriter(System.Buffers.IBufferWriter<byte> bufferWriter, System.Text.Json.JsonWriterOptions options = default);
new System.Text.Json.Utf8JsonWriter : System.Buffers.IBufferWriter<byte> * System.Text.Json.JsonWriterOptions -> System.Text.Json.Utf8JsonWriter
Public Sub New (bufferWriter As IBufferWriter(Of Byte), Optional options As JsonWriterOptions = Nothing)

参数

bufferWriter
IBufferWriter<Byte>

写入 JSON 文本的目标。

options
JsonWriterOptions

定义 .的 Utf8JsonWriter自定义行为。 默认情况下,它会写入最小化的 JSON(没有额外的空格),并验证所写入的 JSON 是否根据 JSON RFC 在结构上有效。

例外

bufferWriternull

适用于

Utf8JsonWriter(Stream, JsonWriterOptions)

Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs
Source:
Utf8JsonWriter.cs

使用指定的流将输出写入和自定义选项初始化类的新实例 Utf8JsonWriter

public Utf8JsonWriter(System.IO.Stream utf8Json, System.Text.Json.JsonWriterOptions options = default);
new System.Text.Json.Utf8JsonWriter : System.IO.Stream * System.Text.Json.JsonWriterOptions -> System.Text.Json.Utf8JsonWriter
Public Sub New (utf8Json As Stream, Optional options As JsonWriterOptions = Nothing)

参数

utf8Json
Stream

写入 JSON 文本的目标。

options
JsonWriterOptions

定义 .的 Utf8JsonWriter自定义行为。 默认情况下,它会写入最小化的 JSON(没有额外的空格),并验证所写入的 JSON 是否根据 JSON RFC 在结构上有效。

例外

utf8Jsonnull

适用于