Add MediaType to existing JsonInputFormatter
<p>I'm writing a webhook in asp.net core mvc where the caller posts some json. But the Content-Type is set to <code>application/vnd.myget.webhooks.v1+json</code>. I just want to have this content type map to the <code>JsonInputFormatter</code>. </p>

<p>I did this, but wondering if there is a better way:</p>

<pre><code>services.AddMvc( mvcConfig =&gt;
{
    var formatter = new JsonInputFormatter();
    formatter.SupportedMediaTypes.Add( 
         new MediaTypeHeaderValue("application/vnd.myget.webhooks.v1+json") );
    mvcConfig.InputFormatters.Add( formatter );
});
</code></pre>