Skip to content

IMutableJsonDocument.MovePropertyToProperty Method

Definition

Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll
Source: IMutableJsonDocument.cs

MovePropertyToProperty(int, ReadOnlySpan<byte>, int, ReadOnlySpan<byte>)

Moves a property from a source object to a destination object as a new property. Handles removing existing destination properties and same-property no-ops.

public abstract bool MovePropertyToProperty(int srcObjectIndex, ReadOnlySpan<byte> srcPropertyName, int dstObjectIndex, ReadOnlySpan<byte> dstPropertyName)

Parameters

Name Type Description
srcObjectIndex int The start index of the source object.
srcPropertyName ReadOnlySpan<byte> The UTF-8 name of the source property.
dstObjectIndex int The start index of the destination object.
dstPropertyName ReadOnlySpan<byte> The UTF-8 name for the destination property.

Returns

bool

true if the property was found and moved; otherwise, false.

Applies To

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

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