Fixes issue #2978 - JSON MIME type

Please see #2978 for explanation.