Skip to content

GetJsonElement Method ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

JsonElement GetJsonElement(int ordinal) ​

csharp
JsonElement GetJsonElement(int ordinal)

Reads the value at the specified ordinal as a JsonElement.

Parameters ​

NameDescription
ordinalThe zero-based column ordinal.

Returns ​

A JsonElement representing the parsed JSON value, or default (Undefined) when the column is NULL.

Remarks ​

NULL columns return default(JsonElement) so non-nullable JsonElement properties can materialize without throwing. Prefer nullable JsonElement? (via GetNullableJsonElement) when NULL must be distinguished from a JSON value.

The JSON payload is parsed from its string representation. The returned JsonElement does not require disposal.