Table of Contents

Class JsonElementExtensions

Namespace
GenerativeAI
Assembly
GenerativeAI.dll

Provides extension methods for JsonElement objects.

public static class JsonElementExtensions
Inheritance
JsonElementExtensions
Inherited Members

Methods

AsNode(JsonElement)

Converts a JsonElement to a JsonNode.

public static JsonNode? AsNode(this JsonElement element)

Parameters

element JsonElement

The element.

Returns

JsonNode

An equivalent node.

Remarks

This provides a single point of conversion as one is not provided by .Net. See https://github.com/dotnet/runtime/issues/70427 for more information.