JsonMediaTypeFormatter.DefaultMediaType Property
Gets the default media type for JSON, namely "application/json".
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Public Shared ReadOnly Property DefaultMediaType As MediaTypeHeaderValue
Get
'Usage
Dim value As MediaTypeHeaderValue
value = JsonMediaTypeFormatter.DefaultMediaType
public static MediaTypeHeaderValue DefaultMediaType { get; }
public:
static property MediaTypeHeaderValue^ DefaultMediaType {
MediaTypeHeaderValue^ get ();
}
static member DefaultMediaType : MediaTypeHeaderValue
static function get DefaultMediaType () : MediaTypeHeaderValue
Property Value
Type: MediaTypeHeaderValue
The MediaTypeHeaderValue for JSON.
Remarks
The default media type does not have any charset parameter as the Encoding can be configured on a per JsonMediaTypeFormatter instance basis.