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(ref TContext, ComplexValueBuilder.ValueBuilderAction<TContext>)
AddItem(bool) Adds a boolean item to the current array.
AddItem(ref T) Adds a JSON element item to the current array.
AddItem(Guid) Adds a Guid item to the current array.
AddItem(ref DateTime) Adds a DateTime item to the current array.
AddItem(ref DateTimeOffset) Adds a DateTimeOffset item to the current array.
AddItem(ref OffsetDateTime) Adds an OffsetDateTime item to the current array.
AddItem(ref OffsetDate) Adds an OffsetDate item to the current array.
AddItem(ref OffsetTime) Adds an OffsetTime item to the current array.
AddItem(ref LocalDate) Adds a LocalDate item to the current array.
AddItem(ref 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(ref BigNumber) Adds a BigNumber item to the current array.
AddItem(ref 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(ref TContext, ComplexValueBuilder.ValueBuilderAction<TContext>)

Source: ComplexValueBuilder.cs

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

Parameters

Name Type Description
context ref 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(ref T)

Source: ComplexValueBuilder.cs

Adds a JSON element item to the current array.

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

Type Parameters

Parameter Description
T The type of the JSON element.

Parameters

Name Type Description
value ref 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(ref DateTime)

Source: ComplexValueBuilder.cs

Adds a DateTime item to the current array.

public void AddItem(ref DateTime value)

Parameters

Name Type Description
value ref DateTime The DateTime value.

Applies To

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

AddItem(ref DateTimeOffset)

Source: ComplexValueBuilder.cs

Adds a DateTimeOffset item to the current array.

public void AddItem(ref DateTimeOffset value)

Parameters

Name Type Description
value ref DateTimeOffset The DateTimeOffset value.

Applies To

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

AddItem(ref OffsetDateTime)

Source: ComplexValueBuilder.cs

Adds an OffsetDateTime item to the current array.

public void AddItem(ref OffsetDateTime value)

Parameters

Name Type Description
value ref OffsetDateTime The OffsetDateTime value.

Applies To

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

AddItem(ref OffsetDate)

Source: ComplexValueBuilder.cs

Adds an OffsetDate item to the current array.

public void AddItem(ref OffsetDate value)

Parameters

Name Type Description
value ref OffsetDate The OffsetDate value.

Applies To

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

AddItem(ref OffsetTime)

Source: ComplexValueBuilder.cs

Adds an OffsetTime item to the current array.

public void AddItem(ref OffsetTime value)

Parameters

Name Type Description
value ref OffsetTime The OffsetTime value.

Applies To

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

AddItem(ref LocalDate)

Source: ComplexValueBuilder.cs

Adds a LocalDate item to the current array.

public void AddItem(ref LocalDate value)

Parameters

Name Type Description
value ref LocalDate The LocalDate value.

Applies To

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

AddItem(ref Period)

Source: ComplexValueBuilder.cs

Adds a Period item to the current array.

public void AddItem(ref Period value)

Parameters

Name Type Description
value ref 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(ref BigNumber)

Source: ComplexValueBuilder.cs

Adds a BigNumber item to the current array.

public void AddItem(ref BigNumber value)

Parameters

Name Type Description
value ref BigNumber The BigNumber value.

Applies To

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

AddItem(ref BigInteger)

Source: ComplexValueBuilder.cs

Adds a BigInteger item to the current array.

public void AddItem(ref BigInteger value)

Parameters

Name Type Description
value ref 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