Skip to content

ComplexValueBuilder.AddItem Method

Definition

Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll

Overloads

Method Description
AddItem(ReadOnlySpan<byte>) Adds an item to the current array as a UTF-8 string.
AddItem(string) Adds an item to the current array as a string.
AddItem(ReadOnlySpan<byte>, bool, bool) Adds an item to the current array as a UTF-8 string with control over escaping.
AddItem(ReadOnlySpan<char>) Adds an item to the current array as a character span.
AddItem(ComplexValueBuilder.ValueBuilderAction)
AddItem(TContext, ComplexValueBuilder.ValueBuilderAction<TContext>)
AddItem(bool) Adds a boolean item to the current array.
AddItem(T) Adds a JSON element item to the current array.
AddItem(Guid) Adds a Guid item to the current array.
AddItem(DateTime) Adds a DateTime item to the current array.
AddItem(DateTimeOffset) Adds a DateTimeOffset item to the current array.
AddItem(OffsetDateTime) Adds an OffsetDateTime item to the current array.
AddItem(OffsetDate) Adds an OffsetDate item to the current array.
AddItem(OffsetTime) Adds an OffsetTime item to the current array.
AddItem(LocalDate) Adds a LocalDate item to the current array.
AddItem(Period) Adds a Period item to the current array.
AddItem(sbyte) Adds an SByte item to the current array.
AddItem(byte) Adds a Byte item to the current array.
AddItem(int) Adds an Int32 item to the current array.
AddItem(uint) Adds a UInt32 item to the current array.
AddItem(long) Adds a Int64 item to the current array.
AddItem(ulong) Adds a UInt64 item to the current array.
AddItem(short) Adds a Int16 item to the current array.
AddItem(ushort) Adds a UInt16 item to the current array.
AddItem(float) Adds a Single item to the current array.
AddItem(double) Adds a Double item to the current array.
AddItem(decimal) Adds a Decimal item to the current array.
AddItem(BigNumber) Adds a BigNumber item to the current array.
AddItem(BigInteger) Adds a BigInteger item to the current array.
AddItem(Int128) Adds an Int128 item to the current array.
AddItem(UInt128) Adds a UInt128 item to the current array.
AddItem(Half) Adds a Half item to the current array.

AddItem(ReadOnlySpan<byte>)

Source: ComplexValueBuilder.cs

Adds an item to the current array as a UTF-8 string.

public void AddItem(ReadOnlySpan<byte> utf8String)

Parameters

Name Type Description
utf8String ReadOnlySpan<byte> The item value as a UTF-8 byte span.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(string)

Source: ComplexValueBuilder.cs

Adds an item to the current array as a string.

public void AddItem(string value)

Parameters

Name Type Description
value string The item value as a string.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(ReadOnlySpan<byte>, bool, bool)

Source: ComplexValueBuilder.cs

Adds an item to the current array as a UTF-8 string with control over escaping.

public void AddItem(ReadOnlySpan<byte> utf8String, bool escapeValue, bool requiresUnescaping)

Parameters

Name Type Description
utf8String ReadOnlySpan<byte> The item value as a UTF-8 byte span.
escapeValue bool Whether to escape the value.
requiresUnescaping bool Whether the value requires unescaping.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(ReadOnlySpan<char>)

Source: ComplexValueBuilder.cs

Adds an item to the current array as a character span.

public void AddItem(ReadOnlySpan<char> value)

Parameters

Name Type Description
value ReadOnlySpan<char> The item value as a character span.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(ComplexValueBuilder.ValueBuilderAction)

Source: ComplexValueBuilder.cs

public void AddItem(ComplexValueBuilder.ValueBuilderAction createValue)

Parameters

Name Type Description
createValue ComplexValueBuilder.ValueBuilderAction

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(TContext, ComplexValueBuilder.ValueBuilderAction<TContext>)

Source: ComplexValueBuilder.cs

public void AddItem<TContext>(in TContext context, ComplexValueBuilder.ValueBuilderAction<TContext> createValue)

Parameters

Name Type Description
context TContext
createValue ComplexValueBuilder.ValueBuilderAction<TContext>

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(bool)

Source: ComplexValueBuilder.cs

Adds a boolean item to the current array.

public void AddItem(bool value)

Parameters

Name Type Description
value bool The boolean value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(T)

Source: ComplexValueBuilder.cs

Adds a JSON element item to the current array.

public void AddItem<T>(in T value)
    where T : struct, IJsonElement<T>

Type Parameters

Parameter Description
T The type of the JSON element.

Parameters

Name Type Description
value T The JSON element value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(Guid)

Source: ComplexValueBuilder.cs

Adds a Guid item to the current array.

public void AddItem(Guid value)

Parameters

Name Type Description
value Guid The Guid value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(DateTime)

Source: ComplexValueBuilder.cs

Adds a DateTime item to the current array.

public void AddItem(in DateTime value)

Parameters

Name Type Description
value DateTime The DateTime value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(DateTimeOffset)

Source: ComplexValueBuilder.cs

Adds a DateTimeOffset item to the current array.

public void AddItem(in DateTimeOffset value)

Parameters

Name Type Description
value DateTimeOffset The DateTimeOffset value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(OffsetDateTime)

Source: ComplexValueBuilder.cs

Adds an OffsetDateTime item to the current array.

public void AddItem(in OffsetDateTime value)

Parameters

Name Type Description
value OffsetDateTime The OffsetDateTime value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(OffsetDate)

Source: ComplexValueBuilder.cs

Adds an OffsetDate item to the current array.

public void AddItem(in OffsetDate value)

Parameters

Name Type Description
value OffsetDate The OffsetDate value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(OffsetTime)

Source: ComplexValueBuilder.cs

Adds an OffsetTime item to the current array.

public void AddItem(in OffsetTime value)

Parameters

Name Type Description
value OffsetTime The OffsetTime value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(LocalDate)

Source: ComplexValueBuilder.cs

Adds a LocalDate item to the current array.

public void AddItem(in LocalDate value)

Parameters

Name Type Description
value LocalDate The LocalDate value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(Period)

Source: ComplexValueBuilder.cs

Adds a Period item to the current array.

public void AddItem(in Period value)

Parameters

Name Type Description
value Period The Period value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(sbyte)

Source: ComplexValueBuilder.cs

Adds an SByte item to the current array.

public void AddItem(sbyte value)

Parameters

Name Type Description
value sbyte The SByte value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(byte)

Source: ComplexValueBuilder.cs

Adds a Byte item to the current array.

public void AddItem(byte value)

Parameters

Name Type Description
value byte The Byte value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(int)

Source: ComplexValueBuilder.cs

Adds an Int32 item to the current array.

public void AddItem(int value)

Parameters

Name Type Description
value int The Int32 value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(uint)

Source: ComplexValueBuilder.cs

Adds a UInt32 item to the current array.

public void AddItem(uint value)

Parameters

Name Type Description
value uint The UInt32 value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(long)

Source: ComplexValueBuilder.cs

Adds a Int64 item to the current array.

public void AddItem(long value)

Parameters

Name Type Description
value long The Int64 value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(ulong)

Source: ComplexValueBuilder.cs

Adds a UInt64 item to the current array.

public void AddItem(ulong value)

Parameters

Name Type Description
value ulong The UInt64 value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(short)

Source: ComplexValueBuilder.cs

Adds a Int16 item to the current array.

public void AddItem(short value)

Parameters

Name Type Description
value short The Int16 value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(ushort)

Source: ComplexValueBuilder.cs

Adds a UInt16 item to the current array.

public void AddItem(ushort value)

Parameters

Name Type Description
value ushort The UInt16 value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(float)

Source: ComplexValueBuilder.cs

Adds a Single item to the current array.

public void AddItem(float value)

Parameters

Name Type Description
value float The Single value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(double)

Source: ComplexValueBuilder.cs

Adds a Double item to the current array.

public void AddItem(double value)

Parameters

Name Type Description
value double The Double value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(decimal)

Source: ComplexValueBuilder.cs

Adds a Decimal item to the current array.

public void AddItem(decimal value)

Parameters

Name Type Description
value decimal The Decimal value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(BigNumber)

Source: ComplexValueBuilder.cs

Adds a BigNumber item to the current array.

public void AddItem(in BigNumber value)

Parameters

Name Type Description
value BigNumber The BigNumber value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(BigInteger)

Source: ComplexValueBuilder.cs

Adds a BigInteger item to the current array.

public void AddItem(in BigInteger value)

Parameters

Name Type Description
value BigInteger The BigInteger value.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

AddItem(Int128)

Source: ComplexValueBuilder.cs

Adds an Int128 item to the current array.

public void AddItem(Int128 value)

Parameters

Name Type Description
value Int128 The Int128 value.

Applies To

Product Versions
.NET 9, 10

AddItem(UInt128)

Source: ComplexValueBuilder.cs

Adds a UInt128 item to the current array.

public void AddItem(UInt128 value)

Parameters

Name Type Description
value UInt128 The UInt128 value.

Applies To

Product Versions
.NET 9, 10

AddItem(Half)

Source: ComplexValueBuilder.cs

Adds a Half item to the current array.

public void AddItem(Half value)

Parameters

Name Type Description
value Half The Half value.

Applies To

Product Versions
.NET 9, 10

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue