Share via


JsonFormatHandler Class

 

Represents the JSON mechanism for serializing request in additional formats.

Namespace:   Microsoft.Web.Mvc.Resources
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Web.Mvc.Resources.JsonFormatHandler

Syntax

public class JsonFormatHandler : IRequestFormatHandler, IResponseFormatHandler
public ref class JsonFormatHandler : IRequestFormatHandler, IResponseFormatHandler
type JsonFormatHandler = 
    class
        interface IRequestFormatHandler
        interface IResponseFormatHandler
    end
Public Class JsonFormatHandler
    Implements IRequestFormatHandler, IResponseFormatHandler

Constructors

Name Description
System_CAPS_pubmethod JsonFormatHandler()

Initializes a new instance of the JsonFormatHandler class.

Properties

Name Description
System_CAPS_pubproperty FriendlyName

Gets the preferred friendly name for the handled format.

Methods

Name Description
System_CAPS_pubmethod CanDeserialize(ContentType)

Returns true if the specified request format can be deserialized.

System_CAPS_pubmethod CanSerialize(ContentType)

Returns true if the specified response format can be serialized.

System_CAPS_pubmethod Deserialize(ControllerContext, ModelBindingContext, ContentType)

Deserialize the object model into the JSON body in the specified request format.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod IsCompatibleMediaType(String)

Returns true if the object is compatible to the media type.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod Serialize(ControllerContext, Object, ContentType)

Serialize the object model into the JSON body in the specified response format.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod TryMapFormatFriendlyName(String, ContentType)

Returns true if the specified friendly name ('xml' for instance) can be mapped to a content type ('application/xml' for instance). If the mapping can be performed return the content type that the friendlyName maps to.

Thread Safety

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

See Also

Microsoft.Web.Mvc.Resources Namespace

Return to top