Return correct mimetype for json response