Editare

Partajați prin


JsonValue Class

Definition

Represents a mutable JSON value.

public ref class JsonValue abstract : System::Text::Json::Nodes::JsonNode
public abstract class JsonValue : System.Text.Json.Nodes.JsonNode
type JsonValue = class
    inherit JsonNode
Public MustInherit Class JsonValue
Inherits JsonNode
Inheritance
JsonValue

Properties

Item[Int32]

Gets or sets the element at the specified index.

(Inherited from JsonNode)
Item[String]

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

(Inherited from JsonNode)
Options

Gets the options to control the behavior.

(Inherited from JsonNode)
Parent

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

(Inherited from JsonNode)
Root

Gets the root JsonNode.

(Inherited from JsonNode)

Methods

AsArray()

Casts to the derived JsonArray type.

(Inherited from JsonNode)
AsObject()

Casts to the derived JsonObject type.

(Inherited from JsonNode)
AsValue()

Casts to the derived JsonValue type.

(Inherited from JsonNode)
Create(Boolean, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Byte, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Char, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(DateTime, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(DateTimeOffset, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Decimal, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Double, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Guid, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Int16, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Int32, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Int64, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(JsonElement, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Boolean>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Byte>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Char>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<DateTime>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<DateTimeOffset>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Decimal>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Double>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Guid>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Int16>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Int32>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Int64>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<JsonElement>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<SByte>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<Single>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<UInt16>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<UInt32>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Nullable<UInt64>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(SByte, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(Single, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(String, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(UInt16, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(UInt32, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create(UInt64, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create<T>(T, JsonTypeInfo<T>, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

Create<T>(T, Nullable<JsonNodeOptions>)

Initializes a new instance of the JsonValue class that contains the specified value.

DeepClone()

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

(Inherited from JsonNode)
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.

(Inherited from JsonNode)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetPath()

Gets the JSON path.

(Inherited from JsonNode)
GetPropertyName()

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

(Inherited from JsonNode)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetValue<T>()

Gets the value for the current JsonValue.

(Inherited from JsonNode)
GetValueKind()

Returns the JsonValueKind of the current instance.

(Inherited from JsonNode)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ReplaceWith<T>(T)

Replaces this node with a new value.

(Inherited from JsonNode)
ToJsonString(JsonSerializerOptions)

Converts the current instance to a string in JSON format.

(Inherited from JsonNode)
ToString()

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

(Inherited from JsonNode)
TryGetValue<T>(T)

Tries to obtain the current JSON value and returns a value that indicates whether the operation succeeded.

WriteTo(Utf8JsonWriter, JsonSerializerOptions)

Writes the JsonNode into the provided Utf8JsonWriter as JSON.

(Inherited from 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