diff --git a/core/modules/rest/src/Plugin/views/style/Serializer.php b/core/modules/rest/src/Plugin/views/style/Serializer.php
index 09e94e6..fe98f8e 100644
--- a/core/modules/rest/src/Plugin/views/style/Serializer.php
+++ b/core/modules/rest/src/Plugin/views/style/Serializer.php
@@ -125,10 +125,9 @@ public function render() {
       $rows[] = $this->view->rowPlugin->render($row);
     }
 
-    $content_type = $this->displayHandler->getContentType();
-    if (!empty($this->view->live_preview)) {
-      $content_type = $this->options['formats'] ? reset($this->options['formats']) : 'json';
-    }
+    // Get the content type configured in the display or fallback to the
+    // default.
+    $content_type = $this->options['formats'] ? reset($this->options['formats']) : $this->displayHandler->getContentType();
 
     return $this->serializer->serialize($rows, $content_type);
   }
