1.

Explain media type formatters.

Answer»

In WEB API, MEDIA type formatters are classes that are responsible for serialization data. Here, serialization generally means a process of translating data into a format that can be transmitted and RECONSTRUCTED later.  Because of serializing request/response data, Web API can understand request data format in a better way and send data in a format that the client expects. It simply specifies data that is being transferred among client and SERVER in HTTP response or request. 

Media Type Formatter ClassMIME TypeDescription
JsonMediaTypeFormatterapplication/json, text/jsonHandles JSON format
XmlMediaTypeFormatterapplication/xml, text/jsonHandles XML format
FormUrlEncodedMediaTypeFormatterapplication/x-www-form-urlencodedHandles HTM form URL-encoded data
JQueryMvcFormUrlEncodedFormatterapplication/x-www-form-urlencodedHandles model-bound HTML form URL-encoded data


Discussion

No Comment Found