DynamicJsonObject Class

Represents a collection of values as a JavaScript-like object by using the capabilities of the Dynamic Language Runtime.


Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

public class DynamicJsonObject : DynamicObject

The DynamicJsonObject type exposes the following members.

Public methodDynamicJsonObjectInfrastructure. Initializes a new instance of the DynamicJsonObject class using the specified field values.

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetDynamicMemberNamesInfrastructure. Returns a list that contains the name of all dynamic members (JSON fields) of the DynamicJsonObject instance. (Overrides DynamicObject.GetDynamicMemberNames().)
Public methodGetHashCode (Inherited from Object.)
Public methodGetMetaObject (Inherited from DynamicObject.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodTryBinaryOperation (Inherited from DynamicObject.)
Public methodTryConvertInfrastructure. Converts the DynamicJsonObject instance to a compatible type. (Overrides DynamicObject.TryConvert(ConvertBinder, Object).)
Public methodTryCreateInstance (Inherited from DynamicObject.)
Public methodTryDeleteIndex (Inherited from DynamicObject.)
Public methodTryDeleteMember (Inherited from DynamicObject.)
Public methodTryGetIndexInfrastructure. Gets the value of a DynamicJsonObject field using the specified index. (Overrides DynamicObject.TryGetIndex(GetIndexBinder, Object[], Object).)
Public methodTryGetMemberInfrastructure. Gets the value of a DynamicJsonObject field using the specified name. (Overrides DynamicObject.TryGetMember(GetMemberBinder, Object).)
Public methodTryInvoke (Inherited from DynamicObject.)
Public methodTryInvokeMember (Inherited from DynamicObject.)
Public methodTrySetIndexInfrastructure. Sets the value of a DynamicJsonObject field using the specified index. (Overrides DynamicObject.TrySetIndex(SetIndexBinder, Object[], Object).)
Public methodTrySetMemberInfrastructure. Sets the value of a DynamicJsonObject field using the specified name. (Overrides DynamicObject.TrySetMember(SetMemberBinder, Object).)
Public methodTryUnaryOperation (Inherited from DynamicObject.)

This class represents a helper, which is a component that simplifies web programming in ASP.NET Web Pages. You can use the DynamicJsonObject class to interact with .NET Framework objects as you do with JavaScript objects.

The DynamicJsonObject class makes it possible to get and set property values (JSON fields) of JavaScript-like objects, as well as to dynamically add properties, while using the familiar indexing and member-access syntax of the host language.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.