Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

JsonValue Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a Json value.

Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)
[DataContractAttribute]
public class JsonValue : IEnumerable<KeyValuePair<string, JsonValue>>, 
	IEnumerable, IDynamicMetaObjectProvider

The JsonValue type exposes the following members.

  NameDescription
Protected propertyChangedListenersCountGets the number of the changed listeners.
Protected propertyChangingListenersCountGets the number of the changing listeners.
Public propertyCountGets the number of Json values.
Public propertyItem[Int32]Gets or sets the JsonValue object with specified index.
Public propertyItem[String]Gets or sets the JsonValue object with specified key.
Public propertyJsonTypeGets a value that indicates whether the JSON CLR type represented by the derived type.
Top
  NameDescription
Public methodAsDynamicReturns the Json value as a dynamic object.
Public methodStatic memberCastValue<T>Specifies the cast value of the JsonValue.
Public methodContainsKeyThrows an InvalidOperationException.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that can iterate through the JsonValue.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Protected methodGetKeyValuePairEnumeratorGets the key value pair enumerator for the JsonValue.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetValue(Int32)Gets the Json value with specified index.
Public methodGetValue(String)Gets the Json value with specified key.
Public methodStatic memberLoad(Stream)Deserializes the text-based JSON from a stream into JSON CLR type.
Public methodStatic memberLoad(TextReader)Deserializes the text-based JSON from a text reader into a JSON CLR type.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnSaveEndedOccurs when the save is ended.
Protected methodOnSaveStartedOccurs when the save is started.
Public methodStatic memberParseDeserializes the text-based JSON into a JSON CLR type.
Protected methodRaiseChangedEventRaises the Changed event.
Protected methodRaiseChangingEventRaises the Changing event.
Public methodReadAs(Type)Reads the Jsonvalue with specified type.
Public methodReadAs(Type, Object)Reads the Jsonvalue with specified type.
Public methodReadAs<T>()Reads the JsonValue as an object.
Public methodReadAs<T>(T)Reads the JsonValue as an object with specified fallback.
Public methodSave(Stream)Serializes the JsonValue CLR type into text-based JSON using a stream.
Public methodSave(TextWriter)Serializes the JsonValue CLR type into text-based JSON using a text writer.
Public methodSetValue(Int32, Object)Sets the Json value with specified index and value.
Public methodSetValue(String, Object)Sets the Json value with specified key and value.
Public methodToStringSaves (serializes) this JSON CLR type into text-based JSON. (Overrides Object.ToString().)
Public methodTryReadAs(Type, Object)Indicates whether the JsonValue tries to read as type.
Public methodTryReadAs<T>(T)Indicates whether the JsonValue tries to read as a generic type.
Public methodValueOrDefault(Int32)Specifies the value or the default value of the Json object with specified index.
Public methodValueOrDefault(Object[])Specifies the value or the default value of the Json object with specified indexes.
Public methodValueOrDefault(String)Specifies the value or the default value of the Json object with specified key.
Top
  NameDescription
Public eventChangedOccurs when the Json Value is changed.
Public eventChangingOccurs when the Json Value is changing.
Top
  NameDescription
Public operatorStatic memberExplicit(JsonValue to Int32)Enables explicit casts from an instance of type JsonValue to a Int32 object.
Public operatorStatic memberExplicit(JsonValue to UInt32)Enables explicit casts from an instance of type JsonValue to a UInt32 object.
Public operatorStatic memberExplicit(JsonValue to Int16)Enables explicit casts from an instance of type JsonValue to a Int16 object.
Public operatorStatic memberExplicit(JsonValue to Single)Enables explicit casts from an instance of type JsonValue to a Single object.
Public operatorStatic memberExplicit(JsonValue to UInt64)Enables explicit casts from an instance of type JsonValue to a UInt64 object.
Public operatorStatic memberExplicit(JsonValue to Double)Enables explicit casts from an instance of type JsonValue to a Double object.
Public operatorStatic memberExplicit(JsonValue to String)Enables explicit casts from an instance of type JsonValue to a String object.
Public operatorStatic memberExplicit(JsonValue to Int64)Enables explicit casts from an instance of type JsonValue to a Int64 object.
Public operatorStatic memberExplicit(JsonValue to Decimal)Enables explicit casts from an instance of type JsonValue to a Decimal object.
Public operatorStatic memberExplicit(JsonValue to DateTime)Enables explicit casts from an instance of type JsonValue to a DateTime object.
Public operatorStatic memberExplicit(JsonValue to DateTimeOffset)Enables explicit casts from an instance of type JsonValue to a DateTimeOffset object.
Public operatorStatic memberExplicit(JsonValue to Boolean)Enables explicit casts from an instance of type JsonValue to a Boolean object.
Public operatorStatic memberExplicit(JsonValue to Char)Enables explicit casts from an instance of type JsonValue to a Char object.
Public operatorStatic memberExplicit(JsonValue to Uri)Enables explicit casts from an instance of type JsonValue to a Uri object.
Public operatorStatic memberExplicit(JsonValue to UInt16)Enables explicit casts from an instance of type JsonValue to a UInt16 object.
Public operatorStatic memberExplicit(JsonValue to Guid)Enables explicit casts from an instance of type JsonValue to a Guid object.
Public operatorStatic memberExplicit(JsonValue to Byte)Enables explicit casts from an instance of type JsonValue to a Byte object.
Public operatorStatic memberExplicit(JsonValue to SByte)Enables explicit casts from an instance of type JsonValue to a SByte object.
Public operatorStatic memberImplicit(Boolean to JsonValue)Enables implicit casts from type Boolean to a JsonPrimitive.
Public operatorStatic memberImplicit(Byte to JsonValue)Enables implicit casts from type Byte to a JsonPrimitive.
Public operatorStatic memberImplicit(Char to JsonValue)Enables implicit casts from type Char to a JsonPrimitive.
Public operatorStatic memberImplicit(DateTime to JsonValue)Enables implicit casts from type DateTime to a JsonPrimitive.
Public operatorStatic memberImplicit(DateTimeOffset to JsonValue)Enables implicit casts from type DateTimeOffset to a JsonObject.
Public operatorStatic memberImplicit(Decimal to JsonValue)Enables implicit casts from type Decimal to a JsonPrimitive.
Public operatorStatic memberImplicit(Double to JsonValue)Enables implicit casts from type Double to a JsonPrimitive.
Public operatorStatic memberImplicit(Guid to JsonValue)Enables implicit casts from type Guid to a JsonPrimitive.
Public operatorStatic memberImplicit(Int16 to JsonValue)Enables implicit casts from type Int16 to a JsonPrimitive.
Public operatorStatic memberImplicit(Int32 to JsonValue)Enables implicit casts from type Int32 to a JsonPrimitive.
Public operatorStatic memberImplicit(Int64 to JsonValue)Enables implicit casts from type Int64 to a JsonPrimitive.
Public operatorStatic memberImplicit(SByte to JsonValue)Enables implicit casts from type SByte to a JsonPrimitive.
Public operatorStatic memberImplicit(Single to JsonValue)Enables implicit casts from type Single to a JsonPrimitive.
Public operatorStatic memberImplicit(String to JsonValue)Enables implicit casts from type String to a JsonPrimitive.
Public operatorStatic memberImplicit(UInt16 to JsonValue)Enables implicit casts from type UInt16 to a JsonPrimitive.
Public operatorStatic memberImplicit(UInt32 to JsonValue)Enables implicit casts from type UInt32 to a JsonPrimitive.
Public operatorStatic memberImplicit(UInt64 to JsonValue)Enables implicit casts from type UInt64 to a JsonPrimitive.
Public operatorStatic memberImplicit(Uri to JsonValue)Enables implicit casts from type Uri to a JsonPrimitive.
Top
  NameDescription
Public Extension MethodReadAsType(Type)Overloaded. Reads the JsonValueExtensions as a type with specified value. (Defined by JsonValueExtensions.)
Public Extension MethodReadAsType<T>()Overloaded. Reads the JsonValueExtensions as an object. (Defined by JsonValueExtensions.)
Public Extension MethodReadAsType<T>(T)Overloaded. Reads the JsonValueExtensions as an object with specified fallback. (Defined by JsonValueExtensions.)
Public Extension MethodToJsonObjectConverts the specified items to Json object. (Defined by JsonValueLinqExtensions.)
Public Extension MethodTryReadAsType(Type, Object)Overloaded. Tries to read the JsonValueExtensions as a type. (Defined by JsonValueExtensions.)
Public Extension MethodTryReadAsType<T>(T)Overloaded. Tries to read the JsonValueExtensions as a generic type. (Defined by JsonValueExtensions.)
Top
  NameDescription
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorGets the JsonValue enumerator.
Explicit interface implemetationPrivate methodIDynamicMetaObjectProvider.GetMetaObjectGets the JsonValue meta object.
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.