JsonData Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.ObjectJsonData
- 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 |
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
Explicit Interface Implementations
IDynamicMetaObjectProvider.GetMetaObject(Expression) |
Returns the System.Dynamic.DynamicMetaObject responsible for binding operations performed on this object. |