JsonData Class

Definition

A mutable representation of a JSON value.

[System.Text.Json.Serialization.JsonConverter(typeof(Azure.Core.JsonData+JsonConverter))]
public class JsonData : IEquatable<Azure.Core.JsonData>, System.Dynamic.IDynamicMetaObjectProvider
[<System.Text.Json.Serialization.JsonConverter(typeof(Azure.Core.JsonData+JsonConverter))>]
type JsonData = class
    interface IDynamicMetaObjectProvider
    interface IEquatable<JsonData>
Public Class JsonData
Implements IDynamicMetaObjectProvider, IEquatable(Of JsonData)
Inheritance
System.Object
JsonData
Attributes
System.Text.Json.Serialization.JsonConverterAttribute
Implements
System.Dynamic.IDynamicMetaObjectProvider System.IEquatable<JsonData>

Constructors

JsonData()

Creates a new JsonData object which represents an JSON object with no properties.

JsonData(JsonDocument)

Creates a new JsonData object which represents the value of the given JsonDocument.

JsonData(Object)

Creates a new JsonData object which represents the given object.

JsonData(Object, JsonSerializerOptions, Type)

Creates a new JsonData object which represents the given object.

Properties

Item[Int32]

Gets or sets a value at the given index in an array.

Item[String]

Gets or sets a value for a given property in an object.

Items

Returns all the elements in this array.

Kind

The System.Text.Json.JsonValueKind of the value of this instance.

Length

Returns the number of elements in this array.

Properties

Returns the names of all the properties of this object.

Methods

Add(Boolean)

Inserts a new value at the end of an array.

Add(Double)

Inserts a new value at the end of an array.

Add(Int32)

Inserts a new value at the end of an array.

Add(Int64)

Inserts a new value at the end of an array.

Add(Object)

Inserts a new value at the end of an array.

Add(Object, JsonSerializerOptions)

Inserts a new value at the end of an array.

Add(Single)

Inserts a new value at the end of an array.

Add(String)

Inserts a new value at the end of an array.

Add<T>(T[])

Inserts a new value at the end of an array.

Add<T>(T[], JsonSerializerOptions)

Inserts a new value at the end of an array.

AddEmptyArray()

Inserts a new empty array at the end of an array.

AddEmptyObject()

Inserts a new empty object at the end of an array.

EmptyArray()

Returns a new JsonData that represents an empty array.

EmptyObject()

Returns a new JsonData that represents an empty object.

Equals(JsonData)

Indicates whether the current object is equal to another object of the same type.

Equals(Object)

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

FromBytes(Byte[])

Parses text representing a single JSON value into a JsonData.

FromBytes(ReadOnlyMemory<Byte>)

Parses text representing a single JSON value into a JsonData.

FromObject<T>(T, JsonSerializerOptions)

Constructs a JsonData from an object. The value corresponds to the serialized representation of the object.

FromStream(Stream)

Parses text representing a single JSON value into a JsonData.

FromStreamAsync(Stream, CancellationToken)

Parses text representing a single JSON value into a JsonData.

FromString(String)

Parses text representing a single JSON value into a JsonData.

Get(String)

Gets the value of a property from an object, or null if no such property exists.

Get<T>(String)

Returns the value for a given property.

Get<T>(String, JsonSerializerOptions)

Gets the value of a property from an object.

GetHashCode()

Serves as the default hash function.

Set(String, Boolean)

Sets the property of an object to a given value.

Set(String, Double)

Sets the property of an object to a given value.

Set(String, Int32)

Sets the property of an object to a given value.

Set(String, Int64)

Sets the property of an object to a given value.

Set(String, Object)

Sets the property of an object to a given value.

Set(String, Object, JsonSerializerOptions)

Sets the property of an object to a given value.

Set(String, Single)

Sets the property of an object to a given value.

Set(String, String)

Sets the property of an object to a given value.

Set<T>(String, T[])

Sets the property of an object to a given value.

Set<T>(String, T[], JsonSerializerOptions)

Sets the property of an object to a given value.

SetEmptyArray(String)

Sets the property of an object to a new empty array.

SetEmptyObject(String)

Sets the property of an object to a new empty object.

To<T>()

Converts the given JSON value into an instance of a given type.

To<T>(JsonSerializerOptions)

Deserializes the given JSON value into an instance of a given type.

ToJsonString()

Returns a stringified version of the JSON for this value.

ToString()

Returns a string that represents the current object.

WriteTo(Stream)

Writes the UTF-8 encoded string representation of this instance.

WriteToAsync(Stream, CancellationToken)

Writes the UTF-8 encoded string representation of this instance.

Operators

Equality(JsonData, String)

Returns true if a JsonData has the same value as a given string, and false otherwise.

Equality(String, JsonData)

Returns true if a JsonData has the same value as a given string, and false otherwise.

Explicit(JsonData to Boolean)

Converts the value to a System.Boolean

Explicit(JsonData to Double)

Converts the value to a System.Double

Explicit(JsonData to Int32)

Converts the value to a System.Int32

Explicit(JsonData to Int64)

Converts the value to a System.Int64

Explicit(JsonData to Nullable<Boolean>)
Explicit(JsonData to Nullable<Double>)
Explicit(JsonData to Nullable<Int32>)
Explicit(JsonData to Nullable<Int64>)
Explicit(JsonData to Nullable<Single>)
Explicit(JsonData to Single)

Converts the value to a System.Single

Explicit(JsonData to String)

Converts the value to a System.String

Implicit(Boolean to JsonData)

Converts an System.Boolean to a JsonData.

Implicit(Double to JsonData)

Converts an System.Double to a JsonData.

Implicit(Int32 to JsonData)

Converts an System.Int32 to a JsonData.

Implicit(Int64 to JsonData)

Converts an System.Int64 to a JsonData.

Implicit(Nullable<Boolean> to JsonData)

Converts an System.Boolean to a JsonData.

Implicit(Nullable<Double> to JsonData)

Converts an System.Double to a JsonData.

Implicit(Nullable<Int32> to JsonData)

Converts an System.Int32 to a JsonData.

Implicit(Nullable<Int64> to JsonData)

Converts an System.Int64 to a JsonData.

Implicit(Nullable<Single> to JsonData)

Converts an System.Single to a JsonData.

Implicit(Single to JsonData)

Converts an System.Single to a JsonData.

Implicit(String to JsonData)

Converts an System.String to a JsonData.

Inequality(JsonData, String)

Returns false if a JsonData has the same value as a given string, and true otherwise.

Inequality(String, JsonData)

Returns false if a JsonData has the same value as a given string, and true otherwise.

Explicit Interface Implementations

IDynamicMetaObjectProvider.GetMetaObject(Expression)

Returns the System.Dynamic.DynamicMetaObject responsible for binding operations performed on this object.

Applies to