Skip to content

IMutableJsonDocument.TryReplacePropertyValue Method

Definition

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

TryReplacePropertyValue(int, ReadOnlySpan<byte>, JsonTokenType, int, int)

Replaces an existing property value with a simple scalar value.

public abstract bool TryReplacePropertyValue(int objectIndex, ReadOnlySpan<byte> propertyName, JsonTokenType tokenType, int location, int sizeOrLength)

Parameters

Name Type Description
objectIndex int The start index of the object.
propertyName ReadOnlySpan<byte> The UTF-8 property name to find.
tokenType JsonTokenType The token type of the replacement value.
location int The value location in the document's backing store.
sizeOrLength int The size/length/unescaping flag for the value row.

Returns

bool

true if the property was found and replaced; 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