Skip to content

JsonElement.GetPropertyCount Method

Definition

Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: JsonElement.cs

GetPropertyCount()

Get the number of properties contained within the current object value.

public int GetPropertyCount()

Returns

int

The number of properties contained within the current object value.

Exceptions

Exception Description
InvalidOperationException This value's ValueKind is not Object.
ObjectDisposedException The parent JsonDocument has been disposed.

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