Edit

Share via


JsonNode Class

Definition

The base class that represents a single node within a mutable JSON document.

public ref class JsonNode abstract
public abstract class JsonNode
type JsonNode = class
Public MustInherit Class JsonNode
Inheritance
JsonNode
Derived

Properties

Item[Int32]

Gets or sets the element at the specified index.

Item[String]

Gets or sets the element with the specified property name. If the property is not found, null is returned.

Options

Gets the options to control the behavior.

Parent

Gets the parent JsonNode. If there is no parent, null is returned. A parent can either be a JsonObject or a JsonArray.

Root

Gets the root JsonNode.

Methods

AsArray()

Casts to the derived JsonArray type.

AsObject()

Casts to the derived JsonObject type.

AsValue()

Casts to the derived JsonValue type.

DeepClone()

Creates a new instance of the JsonNode class. All child nodes are recursively cloned.

DeepEquals(JsonNode, JsonNode)

Compares the values of two nodes, including the values of all descendant nodes.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetElementIndex()

Returns the index of the current node from the parent JsonArray.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetPath()

Gets the JSON path.

GetPropertyName()

Returns the property name of the current node from the parent object.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetValue<T>()

Gets the value for the current JsonValue.

GetValueKind()

Returns the JsonValueKind of the current instance.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Parse(ReadOnlySpan<Byte>, Nullable<JsonNodeOptions>, JsonDocumentOptions)

Parses text representing a single JSON value.

Parse(Stream, Nullable<JsonNodeOptions>, JsonDocumentOptions)

Parses a Stream as UTF-8-encoded data representing a single JSON value into a JsonNode. The Stream will be read to completion.

Parse(String, Nullable<JsonNodeOptions>, JsonDocumentOptions)

Parses text representing a single JSON value.

Parse(Utf8JsonReader, Nullable<JsonNodeOptions>)

Parses one JSON value (including objects or arrays) from the provided reader.

ParseAsync(Stream, Nullable<JsonNodeOptions>, JsonDocumentOptions, CancellationToken)

Parses a Stream as UTF-8 encoded data representing a single JSON value into a JsonNode. The stream will be read to completion.

ReplaceWith<T>(T)

Replaces this node with a new value.

ToJsonString(JsonSerializerOptions)

Converts the current instance to a string in JSON format.

ToString()

Gets a string representation for the current value appropriate to the node type.

WriteTo(Utf8JsonWriter, JsonSerializerOptions)

Writes the JsonNode into the provided Utf8JsonWriter as JSON.

Operators

Explicit(JsonNode to Boolean)

Defines an explicit conversion of a given JsonNode to a Boolean.

Explicit(JsonNode to Byte)

Defines an explicit conversion of a given JsonNode to a Byte.

Explicit(JsonNode to Char)

Defines an explicit conversion of a given JsonNode to a Char.

Explicit(JsonNode to DateTime)

Defines an explicit conversion of a given JsonNode to a DateTime.

Explicit(JsonNode to DateTimeOffset)

Defines an explicit conversion of a given JsonNode to a DateTimeOffset.

Explicit(JsonNode to Decimal)

Defines an explicit conversion of a given JsonNode to a Decimal.

Explicit(JsonNode to Double)

Defines an explicit conversion of a given JsonNode to a Double.

Explicit(JsonNode to Guid)

Defines an explicit conversion of a given JsonNode to a Guid.

Explicit(JsonNode to Int16)

Defines an explicit conversion of a given JsonNode to an Int16.

Explicit(JsonNode to Int32)

Defines an explicit conversion of a given JsonNode to an Int32.

Explicit(JsonNode to Int64)

Defines an explicit conversion of a given JsonNode to an Int64.

Explicit(JsonNode to Nullable<Boolean>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Boolean.

Explicit(JsonNode to Nullable<Byte>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Byte.

Explicit(JsonNode to Nullable<Char>)

Defines an explicit conversion of a given JsonNode to a Char.

Explicit(JsonNode to Nullable<DateTime>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable DateTime.

Explicit(JsonNode to Nullable<DateTimeOffset>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable DateTimeOffset.

Explicit(JsonNode to Nullable<Decimal>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Decimal.

Explicit(JsonNode to Nullable<Double>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Double.

Explicit(JsonNode to Nullable<Guid>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Guid.

Explicit(JsonNode to Nullable<Int16>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Int16.

Explicit(JsonNode to Nullable<Int32>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Int32.

Explicit(JsonNode to Nullable<Int64>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Int64.

Explicit(JsonNode to Nullable<SByte>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable SByte.

Explicit(JsonNode to Nullable<Single>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable Single.

Explicit(JsonNode to Nullable<UInt16>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable UInt16.

Explicit(JsonNode to Nullable<UInt32>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable UInt32.

Explicit(JsonNode to Nullable<UInt64>)

Defines an explicit conversion of a specified nullable JsonNode to a nullable UInt64.

Explicit(JsonNode to SByte)

Defines an explicit conversion of a given JsonNode to an SByte.

Explicit(JsonNode to Single)

Defines an explicit conversion of a given JsonNode to a Single.

Explicit(JsonNode to String)

Defines an explicit conversion of a specified nullable JsonNode to a nullable String.

Explicit(JsonNode to UInt16)

Defines an explicit conversion of a given JsonNode to a UInt16.

Explicit(JsonNode to UInt32)

Defines an explicit conversion of a given JsonNode to a UInt32.

Explicit(JsonNode to UInt64)

Defines an explicit conversion of a given JsonNode to a UInt64.

Implicit(Boolean to JsonNode)

Defines an implicit conversion of a given Boolean to a JsonNode.

Implicit(Byte to JsonNode)

Defines an implicit conversion of a given Byte to a JsonNode.

Implicit(Char to JsonNode)

Defines an implicit conversion of a given Char to a JsonNode.

Implicit(DateTime to JsonNode)

Defines an implicit conversion of a given DateTime to a JsonNode.

Implicit(DateTimeOffset to JsonNode)

Defines an implicit conversion of a given DateTimeOffset to a JsonNode.

Implicit(Decimal to JsonNode)

Defines an implicit conversion of a given Decimal to a JsonNode.

Implicit(Double to JsonNode)

Defines an implicit conversion of a given Double to a JsonNode.

Implicit(Guid to JsonNode)

Defines an implicit conversion of a given Guid to a JsonNode.

Implicit(Int16 to JsonNode)

Defines an implicit conversion of a given Int16 to a JsonNode.

Implicit(Int32 to JsonNode)

Defines an implicit conversion of a given Int32 to a JsonNode.

Implicit(Int64 to JsonNode)

Defines an implicit conversion of a given Int64 to a JsonNode.

Implicit(Nullable<Boolean> to JsonNode)

Defines an implicit conversion of a specified nullable Boolean to a nullable JsonNode.

Implicit(Nullable<Byte> to JsonNode)

Defines an implicit conversion of a specified nullable Byte to a JsonNode.

Implicit(Nullable<Char> to JsonNode)

Defines an implicit conversion of a specified nullable Char to a JsonNode.

Implicit(Nullable<DateTime> to JsonNode)

Defines an implicit conversion of a specified nullable DateTime to a JsonNode.

Implicit(Nullable<DateTimeOffset> to JsonNode)

Defines an implicit conversion of a specified nullable DateTimeOffset to a JsonNode.

Implicit(Nullable<Decimal> to JsonNode)

Defines an implicit conversion of a specified nullable Decimal to a JsonNode.

Implicit(Nullable<Double> to JsonNode)

Defines an implicit conversion of a specified nullable Double to a JsonNode.

Implicit(Nullable<Guid> to JsonNode)

Defines an implicit conversion of a specified nullable Guid to a JsonNode.

Implicit(Nullable<Int16> to JsonNode)

Defines an implicit conversion of a specified nullable Int16 to a JsonNode.

Implicit(Nullable<Int32> to JsonNode)

Defines an implicit conversion of a specified nullable Int32 to a JsonNode.

Implicit(Nullable<Int64> to JsonNode)

Defines an implicit conversion of a specified nullable Int64 to a JsonNode.

Implicit(Nullable<SByte> to JsonNode)

Defines an implicit conversion of a specified nullable SByte to a JsonNode.

Implicit(Nullable<Single> to JsonNode)

Defines an implicit conversion of a specified nullable Single to a JsonNode.

Implicit(Nullable<UInt16> to JsonNode)

Defines an implicit conversion of a specified nullable UInt16 to a JsonNode.

Implicit(Nullable<UInt32> to JsonNode)

Defines an implicit conversion of a specified nullable UInt32 to a JsonNode.

Implicit(Nullable<UInt64> to JsonNode)

Defines an implicit conversion of a specified nullable UInt64 to a JsonNode.

Implicit(SByte to JsonNode)

Defines an implicit conversion of a specified nullable SByte to a JsonNode.

Implicit(Single to JsonNode)

Defines an implicit conversion of a specified nullable Single to a JsonNode.

Implicit(String to JsonNode)

Defines an implicit conversion of a specified nullable String to a JsonNode.

Implicit(UInt16 to JsonNode)

Defines an implicit conversion of a specified nullable UInt16 to a JsonNode.

Implicit(UInt32 to JsonNode)

Defines an implicit conversion of a specified nullable UInt32 to a JsonNode.

Implicit(UInt64 to JsonNode)

Defines an implicit conversion of a specified nullable UInt64 to a JsonNode.

Extension Methods

Deserialize(JsonNode, JsonTypeInfo)

Converts the JsonNode representing a single JSON value into an instance specified by the jsonTypeInfo.

Deserialize(JsonNode, Type, JsonSerializerOptions)

Converts the JsonNode representing a single JSON value into a returnType.

Deserialize(JsonNode, Type, JsonSerializerContext)

Converts the JsonNode representing a single JSON value into a returnType.

Deserialize<TValue>(JsonNode, JsonSerializerOptions)

Converts the JsonNode representing a single JSON value into a TValue.

Deserialize<TValue>(JsonNode, JsonTypeInfo<TValue>)

Converts the JsonNode representing a single JSON value into a TValue.

Applies to