Fixed test break and JSON MIME type. Fixes issue #2978.