2using System.Globalization;
14 private readonly Utf8JsonWriter _writer;
22 _writer =
new Utf8JsonWriter(bufferWriter);
31 _writer =
new Utf8JsonWriter(stream);
47 await _writer.FlushAsync();
63 await _writer.DisposeAsync();
71 _writer.WriteStartObject();
79 _writer.WriteEndObject();
87 _writer.WriteStartObject();
89 _writer.WriteStartObject();
97 _writer.WriteEndObject();
98 _writer.WriteEndObject();
106 _writer.WriteStartArray();
114 _writer.WriteEndArray();
122 _writer.WriteStartObject();
124 _writer.WriteStartObject();
132 _writer.WriteEndObject();
133 _writer.WriteEndObject();
263 _writer.WritePropertyName(value);
329 _writer.WriteStringValue(value);
338 var str = value.ToString(
"yyyy-MM-dd");
348 var str = value.ToString(
"yyyy-MM-dd");
358 var str = value.ToString(
"yyyy-MM-dd");
368 var str = value.ToUniversalTime().ToString(
"o", CultureInfo.InvariantCulture);
378 var str = value.ToUniversalTime().ToString(
"o", CultureInfo.InvariantCulture);
388 _writer.WriteBooleanValue(value);
396 _writer.WriteNullValue();
Provides functionality for writing data in a streaming manner to a buffer or a stream.
void WriteNull(string fieldName)
Writes a null value with a specific field name.
void WriteNullValue()
Writes a null value to the stream.
void WriteEndEscapedObject()
Writes the end of a specially tagged object.
void WriteDateValue(DateTimeOffset value)
Writes a date value as a tagged element.
void WriteIntValue(int value)
Writes an integer value as a tagged element.
void WriteTaggedValue(string tag, string value)
Writes a tagged value in an object.
Utf8FaunaWriter(Stream stream)
Initializes a new instance of the Utf8FaunaWriter class with a specified stream.
void Dispose()
Disposes the underlying writer.
void WriteStartRef()
Writes the beginning of a reference object.
void WriteBooleanValue(bool value)
Writes a boolean value to the stream.
void WriteDate(string fieldName, DateTime value)
Writes a date value with a specific field name.
void WriteBytesValue(byte[] value)
Writes a byte array value as a tagged element.
void WriteDateValue(DateOnly value)
Writes a date value as a tagged element.
void WriteFieldName(string value)
Writes a field name for the next value.
void WriteDouble(string fieldName, decimal value)
Writes a double value with a specific field name.
void WriteLong(string fieldName, long value)
Writes a long integer value with a specific field name.
void WriteString(string fieldName, string value)
Writes a string value with a specific field name.
void WriteDoubleValue(decimal value)
Writes a double value as a tagged element.
async ValueTask FlushAsync()
Asynchronously flushes the written data to the underlying buffer or stream.
void WriteTime(string fieldName, DateTime value)
Writes a time value with a specific field name.
void WriteStartArray()
Writes the beginning of an array.
void WriteEndArray()
Writes the end of an array.
void WriteLongValue(long value)
Writes a long integer value as a tagged element.
void WriteStartEscapedObject()
Writes the beginning of a specially tagged object.
void WriteDateValue(DateTime value)
Writes a date value as a tagged element.
void WriteDoubleValue(double value)
Writes a double value as a tagged element.
void WriteTimeValue(DateTime value)
Writes a date value as a tagged element.
void WriteModule(string fieldName, Module value)
Writes a module value with a specific field name.
void WriteStringValue(string value)
Writes a string value as a tagged element.
void WriteBytes(string fieldName, byte[] value)
Writes a byte array value with a specific field name.
void WriteBoolean(string fieldName, bool value)
Writes a boolean value with a specific field name.
void WriteDouble(string fieldName, double value)
Writes a double value with a specific field name.
void WriteEndObject()
Writes the end of an object.
void WriteModuleValue(Module value)
Writes a module value as a tagged element.
void Flush()
Flushes the written data to the underlying buffer or stream.
async ValueTask DisposeAsync()
Asynchronously disposes the underlying writer.
void WriteInt(string fieldName, int value)
Writes an integer value with a specific field name.
Utf8FaunaWriter(IBufferWriter< byte > bufferWriter)
Initializes a new instance of the Utf8FaunaWriter class with a specified buffer writer.
void WriteTimeValue(DateTimeOffset value)
Writes a date value as a tagged element.
void WriteEndRef()
Writes the end of a reference object.
void WriteStartObject()
Writes the beginning of an object.
Represents a module, a singleton object grouping related functionalities. Modules are serialized as @...
string Name
Gets the name of the module. The name is used to identify and reference the module.