Utf8JsonWriter Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Utf8JsonWriter(IBufferWriter<Byte>, JsonWriterOptions) |
Initializes a new instance of the Utf8JsonWriter class using the specified IBufferWriter<T> to write the output to and customization options. |
Utf8JsonWriter(Stream, JsonWriterOptions) |
Initializes a new instance of the Utf8JsonWriter class using the specified stream to write the output to and customization options. |
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
Initializes a new instance of the Utf8JsonWriter class using the specified IBufferWriter<T> to write the output to and customization options.
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)
Parameters
- bufferWriter
- IBufferWriter<Byte>
The destination for writing JSON text.
- options
- JsonWriterOptions
Defines the customized behavior of the Utf8JsonWriter. By default, it writes minimized JSON (with no extra white space) and validates that the JSON being written is structurally valid according to the JSON RFC.
Exceptions
bufferWriter
is null
.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
- Source:
- Utf8JsonWriter.cs
Initializes a new instance of the Utf8JsonWriter class using the specified stream to write the output to and customization options.
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)
Parameters
- utf8Json
- Stream
The destination for writing JSON text.
- options
- JsonWriterOptions
Defines the customized behavior of the Utf8JsonWriter. By default, it writes minimized JSON (with no extra white space) and validates that the JSON being written is structurally valid according to the JSON RFC.
Exceptions
utf8Json
is null
.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: