HumanReadableTextWriter Class
Writes human-readable text output with support for indentation, arrays, and objects.
public sealed class HumanReadableTextWriterConstructors
| Name | Description |
|---|---|
| HumanReadableTextWriter(HumanReadableSerializerOptions) | Initializes a new instance of the HumanReadableTextWriter class. |
HumanReadableTextWriter(HumanReadableSerializerOptions)
HumanReadableTextWriter.csInitializes a new instance of the HumanReadableTextWriter class.
public HumanReadableTextWriter(HumanReadableSerializerOptions options)Parameters
optionsHumanReadableSerializerOptions- The serialization options.
Methods
| Name | Description |
|---|---|
| EndArray() | Ends writing an array. |
| EndArrayItem() | Ends writing an array item. |
| EndObject() | Ends writing an object. |
| StartArray() | Starts writing an array. |
| StartArrayItem(string?) | Starts writing an array item. |
| StartObject() | Starts writing an object. |
| ToString() | |
| WriteEmptyArray() | Writes an empty array to the output. |
| WriteEmptyObject() | Writes an empty object to the output. |
| WriteFormattedValue(string, string) | Writes a formatted value to the output using the formatter for the specified media type. |
| WriteNullValue() | Writes a null value to the output. |
| WritePropertyName(string) | Writes a property name to the output. |
| WriteValue(ReadOnlySpan<char>) | Writes a value to the output. |
| WriteValue(string) | Writes a value to the output. |
EndArray()
HumanReadableTextWriter.csEnds writing an array.
public void EndArray()EndArrayItem()
HumanReadableTextWriter.csEnds writing an array item.
public void EndArrayItem()EndObject()
HumanReadableTextWriter.csEnds writing an object.
public void EndObject()StartArray()
HumanReadableTextWriter.csStarts writing an array.
public void StartArray()StartArrayItem(string?)
HumanReadableTextWriter.csStartObject()
HumanReadableTextWriter.csStarts writing an object.
public void StartObject()ToString()
HumanReadableTextWriter.csWriteEmptyArray()
HumanReadableTextWriter.csWrites an empty array to the output.
public void WriteEmptyArray()WriteEmptyObject()
HumanReadableTextWriter.csWrites an empty object to the output.
public void WriteEmptyObject()WriteFormattedValue(string, string)
HumanReadableTextWriter.csWriteNullValue()
HumanReadableTextWriter.csWrites a null value to the output.
public void WriteNullValue()WritePropertyName(string)
HumanReadableTextWriter.csWriteValue overloads
WriteValue(ReadOnlySpan<char>)
HumanReadableTextWriter.csWrites a value to the output.
public void WriteValue(ReadOnlySpan<char> value)Parameters
valueReadOnlySpan<char>- The value to write.