diff --git a/core/lib/Drupal/Component/Utility/Json.php b/core/lib/Drupal/Component/Utility/Json.php
index 88e55ae..d90b1b5 100644
--- a/core/lib/Drupal/Component/Utility/Json.php
+++ b/core/lib/Drupal/Component/Utility/Json.php
@@ -23,7 +23,6 @@ class Json {
    * @return string
    *   Returns the encoded variable.
    *
-   * @see drupal_json_decode()
    * @ingroup php_wrappers
    */
   public static function encode($variable) {
diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
index 3c9745f..6611a1b 100644
--- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
@@ -11,6 +11,7 @@
 use Drupal\views\Tests\ViewTestBase;
 use Drupal\views\Tests\ViewTestData;
 use Drupal\Core\Template\Attribute;
+use Drupal\Component\Utility\Json;
 
 /**
  * Defines a test for block display.
@@ -292,7 +293,7 @@ public function testBlockContextualLinks() {
     $post = array('ids[0]' => $id);
     $response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-page')));
     $this->assertResponse(200);
-    $json = drupal_json_decode($response);
+    $json = Json::decode($response);
     $this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '">Configure block</a></li><li class="views-uiedit"><a href="' . base_path() . 'admin/structure/views/view/test_view_block/edit/block_1">Edit view</a></li></ul>');
   }
 
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php
index 99b1495..f10d969 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php
@@ -9,6 +9,7 @@
 
 use Drupal\Core\Language\Language;
 use Drupal\comment\CommentInterface;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests the 'new' marker on comments.
@@ -116,7 +117,7 @@ public function testCommentNewCommentsIndicator() {
     $this->assertIdentical(1, count($this->xpath('//*[@data-history-node-field-name="comment"]')), 'data-history-node-field-name attribute is set to the correct value.');
     $response = $this->renderNewCommentsNodeLinks(array($this->node->id()));
     $this->assertResponse(200);
-    $json = drupal_json_decode($response);
+    $json = Json::decode($response);
     $expected = array($this->node->id() => array(
       'new_comment_count' => 1,
       'first_new_comment_link' => url('node/' . $this->node->id(), array('fragment' => 'new')),
diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module
index cb0cdee..2fb7702 100644
--- a/core/modules/contextual/contextual.module
+++ b/core/modules/contextual/contextual.module
@@ -7,6 +7,7 @@
 
 use Drupal\Component\Utility\Url;
 use Drupal\Core\Template\Attribute;
+use Drupal\Component\Utility\Json;
 
 /**
  * Implements hook_toolbar().
@@ -302,7 +303,7 @@ function contextual_pre_render_links($element) {
 function contextual_contextual_links_view_alter(&$element, $items) {
   if (isset($element['#contextual_links']['contextual'])) {
     $encoded_links = $element['#contextual_links']['contextual']['metadata']['contextual-views-field-links'];
-    $element['#links'] = drupal_json_decode(rawurldecode($encoded_links));
+    $element['#links'] = Json::decode(rawurldecode($encoded_links));
   }
 }
 
diff --git a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
index e5a727a..8657487 100644
--- a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
+++ b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
@@ -9,6 +9,7 @@
 
 use Drupal\simpletest\WebTestBase;
 use Drupal\Core\Template\Attribute;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests accessible links after inaccessible links on dynamic context.
@@ -77,7 +78,7 @@ function testDifferentPermissions() {
     $this->assertRaw('No contextual ids specified.');
     $response = $this->renderContextualLinks($ids, 'node');
     $this->assertResponse(200);
-    $json = drupal_json_decode($response);
+    $json = Json::decode($response);
     $this->assertIdentical($json[$ids[0]], '<ul class="contextual-links"><li class="nodepage-edit"><a href="' . base_path() . 'node/1/edit">Edit</a></li></ul>');
     $this->assertIdentical($json[$ids[1]], '');
     $this->assertIdentical($json[$ids[2]], '<ul class="contextual-links"><li class="nodepage-edit"><a href="' . base_path() . 'node/3/edit">Edit</a></li></ul>');
@@ -94,7 +95,7 @@ function testDifferentPermissions() {
     $this->assertRaw('No contextual ids specified.');
     $response = $this->renderContextualLinks($ids, 'node');
     $this->assertResponse(200);
-    $json = drupal_json_decode($response);
+    $json = Json::decode($response);
     $this->assertIdentical($json[$ids[0]], '');
     $this->assertIdentical($json[$ids[1]], '');
     $this->assertIdentical($json[$ids[2]], '');
diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditAutocompleteTermTest.php b/core/modules/edit/lib/Drupal/edit/Tests/EditAutocompleteTermTest.php
index 210eabc..debe996 100644
--- a/core/modules/edit/lib/Drupal/edit/Tests/EditAutocompleteTermTest.php
+++ b/core/modules/edit/lib/Drupal/edit/Tests/EditAutocompleteTermTest.php
@@ -10,6 +10,7 @@
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Language\Language;
 use Drupal\simpletest\WebTestBase;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests using in-place editing for an autocomplete entity reference widget.
@@ -142,7 +143,7 @@ public function testAutocompleteEdit() {
     $edit_uri = 'edit/form/node/'. $this->node->id() . '/' . $this->field_name . '/und/full';
     $post = array('nocssjs' => 'true') + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost($edit_uri, 'application/vnd.drupal-ajax', $post);
-    $ajax_commands = drupal_json_decode($response);
+    $ajax_commands = Json::decode($response);
 
     // Prepare form values for submission. drupalPostAJAX() is not suitable for
     // handling pages with JSON responses, so we need our own solution here.
@@ -161,7 +162,7 @@ public function testAutocompleteEdit() {
       // Submit field form and check response. Should render back all the terms.
       $response = $this->drupalPost($edit_uri, 'application/vnd.drupal-ajax', $post);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->drupalSetContent($ajax_commands[0]['data']);
       $this->assertLink($this->term1->label());
       $this->assertLink($this->term2->label());
@@ -172,7 +173,7 @@ public function testAutocompleteEdit() {
       $edit_uri = 'edit/form/node/'. $this->node->id() . '/' . $this->field_name . '/und/full';
       $post = array('nocssjs' => 'true') + $this->getAjaxPageStatePostData();
       $response = $this->drupalPost($edit_uri, 'application/vnd.drupal-ajax', $post);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
 
       // The AjaxResponse's first command is an InsertCommand which contains
       // the form to edit the taxonomy term field, it should contain all three
diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php b/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
index 742a62f..75d7b5c 100644
--- a/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
+++ b/core/modules/edit/lib/Drupal/edit/Tests/EditLoadingTest.php
@@ -11,6 +11,7 @@
 use Drupal\edit\Ajax\MetadataCommand;
 use Drupal\Core\Ajax\AppendCommand;
 use Drupal\Component\Utility\Unicode;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests loading of Edit and lazy-loading of in-place editors.
@@ -159,7 +160,7 @@ public function testUserWithPermission() {
         'aria' => 'Entity node 1, field Body',
       )
     );
-    $this->assertIdentical(drupal_json_decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
+    $this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
     // Restore drupalSettings to build the next requests; simpletest wipes them
     // after a JSON response.
     $this->drupalSettings = $htmlPageDrupalSettings;
@@ -169,7 +170,7 @@ public function testUserWithPermission() {
     //  2. an insert command that loads the required in-place editors
     $post = array('editors[0]' => 'form') + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost('edit/attachments', 'application/vnd.drupal-ajax', $post);
-    $ajax_commands = drupal_json_decode($response);
+    $ajax_commands = Json::decode($response);
     $this->assertIdentical(2, count($ajax_commands), 'The attachments HTTP request results in two AJAX commands.');
     // First command: settings.
     $this->assertIdentical('settings', $ajax_commands[0]['command'], 'The first AJAX command is a settings command.');
@@ -183,7 +184,7 @@ public function testUserWithPermission() {
     $post = array('nocssjs' => 'true', 'reset' => 'true') + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost('edit/form/' . 'node/1/body/und/full', 'application/vnd.drupal-ajax', $post);
     $this->assertResponse(200);
-    $ajax_commands = drupal_json_decode($response);
+    $ajax_commands = Json::decode($response);
     $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
     $this->assertIdentical('editFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is an editFieldForm command.');
     $this->assertIdentical('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The editFieldForm command contains a form.');
@@ -211,7 +212,7 @@ public function testUserWithPermission() {
       // entity in TempStore on the server.
       $response = $this->drupalPost('edit/form/' . 'node/1/body/und/full', 'application/vnd.drupal-ajax', $post);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
       $this->assertIdentical('editFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is an editFieldFormSaved command.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], 'Fine thanks.'), 'Form value saved and printed back.');
@@ -225,7 +226,7 @@ public function testUserWithPermission() {
       $post = array('nocssjs' => 'true');
       $response = $this->drupalPost('edit/entity/' . 'node/1', 'application/json', $post);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->assertIdentical(1, count($ajax_commands), 'The entity submission HTTP request results in one AJAX command.');
       $this->assertIdentical('editEntitySaved', $ajax_commands[0]['command'], 'The first AJAX command is an editEntitySaved command.');
       $this->assertIdentical($ajax_commands[0]['data']['entity_type'], 'node', 'Saved entity is of type node.');
@@ -252,7 +253,7 @@ public function testUserWithPermission() {
       $post = array('nocssjs' => 'true', 'reset' => 'true');
       $response = $this->drupalPost('edit/form/' . 'node/1/body/und/full', 'application/vnd.drupal-ajax', $post);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
       $this->assertIdentical('editFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is an editFieldForm command.');
       $this->assertIdentical('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The editFieldForm command contains a form.');
@@ -271,7 +272,7 @@ public function testUserWithPermission() {
       // @todo Uncomment the below once https://drupal.org/node/2063303 is fixed.
       // $this->assertIdentical('[]', $response);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
       $this->assertIdentical('editFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is an editFieldFormSaved command.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], 'kthxbye'), 'Form value saved and printed back.');
@@ -311,7 +312,7 @@ public function testTitleBaseField() {
         'aria' => 'Entity node 1, field Title',
       )
     );
-    $this->assertIdentical(drupal_json_decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
+    $this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
     // Restore drupalSettings to build the next requests; simpletest wipes them
     // after a JSON response.
     $this->drupalSettings = $htmlPageDrupalSettings;
@@ -321,7 +322,7 @@ public function testTitleBaseField() {
     $post = array('nocssjs' => 'true', 'reset' => 'true') + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost('edit/form/' . 'node/1/title/und/full', 'application/vnd.drupal-ajax', $post);
     $this->assertResponse(200);
-    $ajax_commands = drupal_json_decode($response);
+    $ajax_commands = Json::decode($response);
     $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
     $this->assertIdentical('editFieldForm', $ajax_commands[0]['command'], 'The first AJAX command is an editFieldForm command.');
     $this->assertIdentical('<form ', Unicode::substr($ajax_commands[0]['data'], 0, 6), 'The editFieldForm command contains a form.');
@@ -348,7 +349,7 @@ public function testTitleBaseField() {
       // updated entity in TempStore on the server.
       $response = $this->drupalPost('edit/form/' . 'node/1/title/und/full', 'application/vnd.drupal-ajax', $post);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
       $this->assertIdentical('editFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is an editFieldFormSaved command.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], 'Obligatory question'), 'Form value saved and printed back.');
@@ -361,7 +362,7 @@ public function testTitleBaseField() {
       $post = array('nocssjs' => 'true');
       $response = $this->drupalPost('edit/entity/' . 'node/1', 'application/json', $post);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->assertIdentical(1, count($ajax_commands), 'The entity submission HTTP request results in one AJAX command.');
       $this->assertIdentical('editEntitySaved', $ajax_commands[0]['command'], 'The first AJAX command is an editEntitySaved command.');
       $this->assertIdentical($ajax_commands[0]['data']['entity_type'], 'node', 'Saved entity is of type node.');
@@ -411,7 +412,7 @@ public function testCustomPipeline() {
     // Request editing to render results with the custom render pipeline.
     $post = array('nocssjs' => 'true') + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost($custom_render_url, 'application/vnd.drupal-ajax', $post);
-    $ajax_commands = drupal_json_decode($response);
+    $ajax_commands = Json::decode($response);
 
     // Prepare form values for submission. drupalPostAJAX() is not suitable for
     // handling pages with JSON responses, so we need our own solution here.
@@ -436,7 +437,7 @@ public function testCustomPipeline() {
       // render pipeline.
       $response = $this->drupalPost($custom_render_url, 'application/vnd.drupal-ajax', $post);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->assertIdentical(1, count($ajax_commands), 'The field form HTTP request results in one AJAX command.');
       $this->assertIdentical('editFieldFormSaved', $ajax_commands[0]['command'], 'The first AJAX command is an editFieldFormSaved command.');
       $this->assertTrue(strpos($ajax_commands[0]['data'], 'Fine thanks.'), 'Form value saved and printed back.');
@@ -455,7 +456,7 @@ public function testConcurrentEdit() {
     $post = array('nocssjs' => 'true') + $this->getAjaxPageStatePostData();
     $response = $this->drupalPost('edit/form/' . 'node/1/body/und/full', 'application/vnd.drupal-ajax', $post);
     $this->assertResponse(200);
-    $ajax_commands = drupal_json_decode($response);
+    $ajax_commands = Json::decode($response);
 
     // Prepare form values for submission. drupalPostAJAX() is not suitable for
     // handling pages with JSON responses, so we need our own solution here.
@@ -482,7 +483,7 @@ public function testConcurrentEdit() {
       // because the node was changed in the meantime.
       $response = $this->drupalPost('edit/form/' . 'node/1/body/und/full', 'application/vnd.drupal-ajax', $post);
       $this->assertResponse(200);
-      $ajax_commands = drupal_json_decode($response);
+      $ajax_commands = Json::decode($response);
       $this->assertIdentical(2, count($ajax_commands), 'The field form HTTP request results in two AJAX commands.');
       $this->assertIdentical('editFieldFormValidationErrors', $ajax_commands[1]['command'], 'The second AJAX command is an editFieldFormValidationErrors command.');
       $this->assertTrue(strpos($ajax_commands[1]['data'], t('The content has either been modified by another user, or you have already submitted modifications. As a result, your changes cannot be saved.')), 'Error message returned to user.');
diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationLoadingTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationLoadingTest.php
index 17d1d69..3329bc3 100644
--- a/core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationLoadingTest.php
+++ b/core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationLoadingTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\editor\Tests;
 
 use Drupal\simpletest\WebTestBase;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests Edit module integration endpoints.
@@ -113,7 +114,7 @@ public function testUserWithPermission() {
 
     $response = $this->drupalPost('editor/' . 'node/1/body/und/full', 'application/vnd.drupal-ajax', array());
     $this->assertResponse(200);
-    $ajax_commands = drupal_json_decode($response);
+    $ajax_commands = Json::decode($response);
     $this->assertIdentical(1, count($ajax_commands), 'The untransformed text POST request results in one AJAX command.');
     $this->assertIdentical('editorGetUntransformedText', $ajax_commands[0]['command'], 'The first AJAX command is an editorGetUntransformedText command.');
     $this->assertIdentical('<p>Do you also love Drupal?</p><img src="druplicon.png" data-caption="Druplicon" />', $ajax_commands[0]['data'], 'The editorGetUntransformedText command contains the expected data.');
diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php
index 52a6de5..39670cc 100644
--- a/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php
+++ b/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\editor\Tests;
 
+use Drupal\Component\Utility\Json;
 use Drupal\simpletest\WebTestBase;
 use Drupal\Component\Utility\String;
 
@@ -387,7 +388,7 @@ function testSwitchingSecurity() {
         );
         $response = $this->drupalPost('editor/filter_xss/' . $format, 'application/json', $post);
         $this->assertResponse(200);
-        $json = drupal_json_decode($response);
+        $json = Json::decode($response);
         $this->assertIdentical($json, $expected_filtered_value, 'The value was correctly filtered for XSS attack vectors.');
       }
     }
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutocompleteTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutocompleteTest.php
index 987919d..41ece88 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutocompleteTest.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutocompleteTest.php
@@ -10,8 +10,8 @@
 use Drupal\Component\Utility\Tags;
 use Drupal\entity_reference\EntityReferenceController;
 use Drupal\system\Tests\Entity\EntityUnitTestBase;
-
 use Symfony\Component\HttpFoundation\Request;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests the autocomplete functionality of Entity Reference.
@@ -130,6 +130,6 @@ protected function getAutocompleteResult($type, $input) {
     $entity_reference_controller = EntityReferenceController::create($this->container);
     $result = $entity_reference_controller->handleAutocomplete($request, $type, $this->fieldName, $this->entityType, $this->bundle, 'NULL')->getContent();
 
-    return drupal_json_decode($result);
+    return Json::decode($result);
   }
 }
diff --git a/core/modules/history/lib/Drupal/history/Tests/HistoryTest.php b/core/modules/history/lib/Drupal/history/Tests/HistoryTest.php
index 84356f2..120ad82 100644
--- a/core/modules/history/lib/Drupal/history/Tests/HistoryTest.php
+++ b/core/modules/history/lib/Drupal/history/Tests/HistoryTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\history\Tests;
 
 use Drupal\simpletest\WebTestBase;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests the History endpoints.
@@ -117,7 +118,7 @@ function testHistory() {
     // Retrieve "last read" timestamp for test node, for the current user.
     $response = $this->getNodeReadTimestamps(array($nid));
     $this->assertResponse(200);
-    $json = drupal_json_decode($response);
+    $json = Json::decode($response);
     $this->assertIdentical(array(1 => 0), $json, 'The node has not yet been read.');
 
     // View the node.
@@ -130,13 +131,13 @@ function testHistory() {
     // Simulate JavaScript: perform HTTP request to mark node as read.
     $response = $this->markNodeAsRead($nid);
     $this->assertResponse(200);
-    $timestamp = drupal_json_decode($response);
+    $timestamp = Json::decode($response);
     $this->assertTrue(is_numeric($timestamp), 'Node has been marked as read. Timestamp received.');
 
     // Retrieve "last read" timestamp for test node, for the current user.
     $response = $this->getNodeReadTimestamps(array($nid));
     $this->assertResponse(200);
-    $json = drupal_json_decode($response);
+    $json = Json::decode($response);
     $this->assertIdentical(array(1 => $timestamp), $json, 'The node has been read.');
 
     // Failing to specify node IDs for the first endpoint should return a 404.
diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
index d926528..24d0642 100644
--- a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
+++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\menu\Tests;
 
+use Drupal\Component\Utility\Json;
 /**
  * Defines a test class for testing menu and menu link functionality.
  */
@@ -474,7 +475,7 @@ public function testBlockContextualLinks() {
     $post = array('ids[0]' => $id);
     $response =  $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-page')));
     $this->assertResponse(200);
-    $json = drupal_json_decode($response);
+    $json = Json::decode($response);
     $this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="block-configure"><a href="' . base_path() . 'admin/structure/block/manage/' . $block->id() . '">Configure block</a></li><li class="menu-edit"><a href="' . base_path() . 'admin/structure/menu/manage/tools">Edit menu</a></li></ul>');
   }
 
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php b/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php
index 749337c..f919ad4 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php
@@ -7,6 +7,8 @@
 
 namespace Drupal\rest\Tests;
 
+use Drupal\Component\Utility\Json;
+
 /**
  * Tests resource creation on user, node and test entities.
  */
@@ -105,7 +107,7 @@ public function testCreate() {
       $invalid_serialized = $serializer->serialize($entity, $this->defaultFormat);
       $response = $this->httpRequest('entity/' . $entity_type, 'POST', $invalid_serialized, $this->defaultMimeType);
       $this->assertResponse(422);
-      $error = drupal_json_decode($response);
+      $error = Json::decode($response);
       $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nuuid.0.value: This value is too long. It should have <em class=\"placeholder\">128</em> characters or less.\n");
 
       // Try to create an entity without proper permissions.
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php b/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php
index f3e0eda..53e5ed7 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\rest\Tests;
 
+use Drupal\Component\Utility\Json;
 use Drupal\rest\Tests\RESTTestBase;
 
 /**
@@ -53,7 +54,7 @@ public function testWatchdog() {
     $response = $this->httpRequest("dblog/$id", 'GET', NULL, $this->defaultMimeType);
     $this->assertResponse(200);
     $this->assertHeader('content-type', $this->defaultMimeType);
-    $log = drupal_json_decode($response);
+    $log = Json::decode($response);
     $this->assertEqual($log['wid'], $id, 'Log ID is correct.');
     $this->assertEqual($log['type'], 'rest_test', 'Type of log message is correct.');
     $this->assertEqual($log['message'], 'Test message', 'Log message text is correct.');
@@ -61,7 +62,7 @@ public function testWatchdog() {
     // Request an unknown log entry.
     $response = $this->httpRequest("dblog/9999", 'GET', NULL, $this->defaultMimeType);
     $this->assertResponse(404);
-    $decoded = drupal_json_decode($response);
+    $decoded = Json::decode($response);
     $this->assertEqual($decoded['error'], 'Log entry with ID 9999 was not found', 'Response message is correct.');
   }
 }
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php b/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php
index 10695c4..aec525d 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/DeleteTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\rest\Tests;
 
+use Drupal\Component\Utility\Json;
 use Drupal\rest\Tests\RESTTestBase;
 
 /**
@@ -61,7 +62,7 @@ public function testDelete() {
       // Try to delete an entity that does not exist.
       $response = $this->httpRequest('entity/' . $entity_type . '/9999', 'DELETE');
       $this->assertResponse(404);
-      $decoded = drupal_json_decode($response);
+      $decoded = Json::decode($response);
       $this->assertEqual($decoded['error'], 'Entity with ID 9999 not found', 'Response message is correct.');
 
       // Try to delete an entity without proper permissions.
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php b/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php
index 8160f74..7ddde9d 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\rest\Tests;
 
+use Drupal\Component\Utility\Json;
 use Drupal\Core\Language\Language;
 use Drupal\rest\Tests\RESTTestBase;
 
@@ -53,7 +54,7 @@ public function testRead() {
       $response = $this->httpRequest('entity/' . $entity_type . '/' . $entity->id(), 'GET', NULL, $this->defaultMimeType);
       $this->assertResponse('200', 'HTTP response code is correct.');
       $this->assertHeader('content-type', $this->defaultMimeType);
-      $data = drupal_json_decode($response);
+      $data = Json::decode($response);
       // Only assert one example property here, other properties should be
       // checked in serialization tests.
       $this->assertEqual($data['uuid'][0]['value'], $entity->uuid(), 'Entity UUID is correct');
@@ -65,7 +66,7 @@ public function testRead() {
       // Try to read an entity that does not exist.
       $response = $this->httpRequest('entity/' . $entity_type . '/9999', 'GET', NULL, $this->defaultMimeType);
       $this->assertResponse(404);
-      $decoded = drupal_json_decode($response);
+      $decoded = Json::decode($response);
       $this->assertEqual($decoded['error'], 'Entity with ID 9999 not found', 'Response message is correct.');
 
       // Make sure that field level access works and that the according field is
@@ -77,7 +78,7 @@ public function testRead() {
         $response = $this->httpRequest('entity/' . $entity_type . '/' . $entity->id(), 'GET', NULL, $this->defaultMimeType);
         $this->assertResponse(200);
         $this->assertHeader('content-type', $this->defaultMimeType);
-        $data = drupal_json_decode($response);
+        $data = Json::decode($response);
         $this->assertFalse(isset($data['field_test_text']), 'Field access protected field is not visible in the response.');
       }
 
@@ -85,14 +86,14 @@ public function testRead() {
       $this->drupalLogout();
       $response = $this->httpRequest('entity/' . $entity_type . '/' . $entity->id(), 'GET', NULL, $this->defaultMimeType);
       $this->assertResponse(403);
-      $this->assertNull(drupal_json_decode($response), 'No valid JSON found.');
+      $this->assertNull(Json::decode($response), 'No valid JSON found.');
     }
     // Try to read a resource which is not REST API enabled.
     $account = $this->drupalCreateUser();
     $this->drupalLogin($account);
     $response = $this->httpRequest('entity/user/' . $account->id(), 'GET', NULL, $this->defaultMimeType);
     $this->assertResponse(404);
-    $this->assertNull(drupal_json_decode($response), 'No valid JSON found.');
+    $this->assertNull(Json::decode($response), 'No valid JSON found.');
   }
 
   /**
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php b/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php
index 9f8d413..052b389 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\rest\Tests;
 
+use Drupal\Component\Utility\Json;
 use Drupal\rest\Tests\RESTTestBase;
 
 /**
@@ -148,7 +149,7 @@ public function testPatchUpdate() {
     $invalid_serialized = $serializer->serialize($entity, $this->defaultFormat);
     $response = $this->httpRequest('entity/' . $entity_type . '/' . $entity->id(), 'PATCH', $invalid_serialized, $this->defaultMimeType);
     $this->assertResponse(422);
-    $error = drupal_json_decode($response);
+    $error = Json::decode($response);
     $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nuuid.0.value: This value is too long. It should have <em class=\"placeholder\">128</em> characters or less.\n");
 
     // Try to update an entity without proper permissions.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 702ef69..49d452b 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -20,6 +20,7 @@
 use Drupal\Core\Datetime\DrupalDateTime;
 use Drupal\block\Entity\Block;
 use Symfony\Component\HttpFoundation\Request;
+use Drupal\Component\Utility\Json;
 
 /**
  * Test case for typical Drupal tests.
@@ -1426,7 +1427,7 @@ protected function drupalGet($path, array $options = array(), array $headers = a
    */
   protected function drupalGetJSON($path, array $options = array(), array $headers = array()) {
     $headers[] = 'Accept: application/json';
-    return drupal_json_decode($this->drupalGet($path, $options, $headers));
+    return Json::decode($this->drupalGet($path, $options, $headers));
   }
 
   /**
@@ -1434,7 +1435,7 @@ protected function drupalGetJSON($path, array $options = array(), array $headers
    */
   protected function drupalGetAJAX($path, array $options = array(), array $headers = array()) {
     $headers[] = 'Accept: application/vnd.drupal-ajax';
-    return drupal_json_decode($this->drupalGet($path, $options, $headers));
+    return Json::decode($this->drupalGet($path, $options, $headers));
   }
 
   /**
@@ -1707,7 +1708,7 @@ protected function drupalPostAjaxForm($path, $edit, $triggering_element, $ajax_p
     }
 
     // Submit the POST request.
-    $return = drupal_json_decode($this->drupalPostForm(NULL, $edit, array('path' => $ajax_path, 'triggering_element' => $triggering_element), $options, $headers, $form_html_id, $extra_post));
+    $return = Json::decode($this->drupalPostForm(NULL, $edit, array('path' => $ajax_path, 'triggering_element' => $triggering_element), $options, $headers, $form_html_id, $extra_post));
 
     // Change the page content by applying the returned commands.
     if (!empty($ajax_settings) && !empty($return)) {
@@ -2587,7 +2588,7 @@ protected function drupalSetContent($content, $url = 'internal:') {
     $this->elements = FALSE;
     $this->drupalSettings = array();
     if (preg_match('/var drupalSettings = (.*?);$/m', $content, $matches)) {
-      $this->drupalSettings = drupal_json_decode($matches[1]);
+      $this->drupalSettings = Json::decode($matches[1]);
     }
   }
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php
index 565e35e..62e53e2 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php
@@ -9,6 +9,7 @@
 
 use Drupal\simpletest\DrupalUnitTestBase;
 use Drupal\Component\Utility\Crypt;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests the JavaScript system.
@@ -193,7 +194,7 @@ function testHeaderSetting() {
     $start = strpos($javascript, $startToken) + strlen($startToken);
     $end = strrpos($javascript, $endToken);
     $json  = drupal_substr($javascript, $start, $end - $start + 1);
-    $parsed_settings = drupal_json_decode($json);
+    $parsed_settings = Json::decode($json);
 
     // Test whether the two real world cases are handled correctly.
     $settings_two['moduleName']['thingiesOnPage']['id1'] = array();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
index 46cf5c3..23693b2 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\system\Tests\Common;
 
 use Drupal\Component\Utility\Html;
+use Drupal\Component\Utility\Json;
 use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
@@ -842,7 +843,7 @@ protected function parseDrupalSettings($html) {
     $start = strpos($html, $startToken) + strlen($startToken);
     $end = strrpos($html, $endToken);
     $json  = drupal_substr($html, $start, $end - $start + 1);
-    $parsed_settings = drupal_json_decode($json);
+    $parsed_settings = Json::decode($json);
     return $parsed_settings;
   }
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/EmailTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/EmailTest.php
index 3ed7c05..b00e117 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Form/EmailTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Form/EmailTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\system\Tests\Form;
 
 use Drupal\simpletest\WebTestBase;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests email element.
@@ -44,14 +45,14 @@ function testFormEmail() {
 
     $edit = array();
     $edit['email_required'] = '  foo.bar@example.com ';
-    $values = drupal_json_decode($this->drupalPostForm('form-test/email', $edit, 'Submit'));
+    $values = Json::decode($this->drupalPostForm('form-test/email', $edit, 'Submit'));
     $this->assertIdentical($values['email'], '');
     $this->assertEqual($values['email_required'], 'foo.bar@example.com');
 
     $edit = array();
     $edit['email'] = 'foo@example.com';
     $edit['email_required'] = 'example@drupal.org';
-    $values = drupal_json_decode($this->drupalPostForm('form-test/email', $edit, 'Submit'));
+    $values = Json::decode($this->drupalPostForm('form-test/email', $edit, 'Submit'));
     $this->assertEqual($values['email'], 'foo@example.com');
     $this->assertEqual($values['email_required'], 'example@drupal.org');
   }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
index f4c2485..a8535b4 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\system\Tests\Form;
 
 use Drupal\simpletest\WebTestBase;
+use Drupal\Component\Utility\Json;
 
 class FormTest extends WebTestBase {
 
@@ -272,7 +273,7 @@ function testCheckboxProcessing() {
     $this->assertRaw(t('!name field is required.', array('!name' => 'required_checkbox')), 'A required checkbox is actually mandatory');
 
     // Now try to submit the form correctly.
-    $values = drupal_json_decode($this->drupalPostForm(NULL, array('required_checkbox' => 1), t('Submit')));
+    $values = Json::decode($this->drupalPostForm(NULL, array('required_checkbox' => 1), t('Submit')));
     $expected_values = array(
       'disabled_checkbox_on' => 'disabled_checkbox_on',
       'disabled_checkbox_off' => '',
@@ -326,7 +327,7 @@ function testSelect() {
       'multiple_no_default_required[]' => 'three',
     );
     $this->drupalPostForm(NULL, $edit, 'Submit');
-    $values = drupal_json_decode($this->drupalGetContent());
+    $values = Json::decode($this->drupalGetContent());
 
     // Verify expected values.
     $expected = array(
@@ -506,7 +507,7 @@ function testDisabledElements() {
     // Submit the form with no input, as the browser does for disabled elements,
     // and fetch the $form_state['values'] that is passed to the submit handler.
     $this->drupalPostForm('form-test/disabled-elements', array(), t('Submit'));
-    $returned_values['normal'] = drupal_json_decode($this->content);
+    $returned_values['normal'] = Json::decode($this->content);
 
     // Do the same with input, as could happen if JavaScript un-disables an
     // element. drupalPostForm() emulates a browser by not submitting input for
@@ -523,7 +524,7 @@ function testDisabledElements() {
     $this->assertEqual(count($disabled_elements), 39, 'The correct elements have the disabled property in the HTML code.');
 
     $this->drupalPostForm(NULL, $edit, t('Submit'));
-    $returned_values['hijacked'] = drupal_json_decode($this->content);
+    $returned_values['hijacked'] = Json::decode($this->content);
 
     // Ensure that the returned values match the form's default values in both
     // cases.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/LanguageSelectElementTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/LanguageSelectElementTest.php
index f6a59f9..b63f201 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Form/LanguageSelectElementTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Form/LanguageSelectElementTest.php
@@ -9,6 +9,7 @@
 
 use Drupal\simpletest\WebTestBase;
 use Drupal\Core\Language\Language;
+use Drupal\Component\Utility\Json;
 
 /**
  * Functional tests for the language select form element.
@@ -89,7 +90,7 @@ function testHiddenLanguageSelectElement() {
     // field elements.
     $edit = array();
     $this->drupalPostForm(NULL, $edit, t('Submit'));
-    $values = drupal_json_decode($this->drupalGetContent());
+    $values = Json::decode($this->drupalGetContent());
     $this->assertEqual($values['languages_all'], 'xx');
     $this->assertEqual($values['languages_configurable'], 'en');
     $this->assertEqual($values['languages_locked'], Language::LANGCODE_NOT_SPECIFIED);
diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/StateValuesCleanTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/StateValuesCleanTest.php
index b7ae222..88dac15 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Form/StateValuesCleanTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Form/StateValuesCleanTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\system\Tests\Form;
 
 use Drupal\simpletest\WebTestBase;
+use Drupal\Component\Utility\Json;
 
 /**
  * Test $form_state clearance.
@@ -33,7 +34,7 @@ public static function getInfo() {
    * Tests form_state_values_clean().
    */
   function testFormStateValuesClean() {
-    $values = drupal_json_decode($this->drupalPostForm('form_test/form-state-values-clean', array(), t('Submit')));
+    $values = Json::decode($this->drupalPostForm('form_test/form-state-values-clean', array(), t('Submit')));
 
     // Setup the expected result.
     $result = array(
diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/UrlTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/UrlTest.php
index ccfb52e..eab4ce3 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Form/UrlTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Form/UrlTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\system\Tests\Form;
 
 use Drupal\simpletest\WebTestBase;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests URL element.
@@ -45,14 +46,14 @@ function testFormUrl() {
     $edit = array();
     $edit['url'] = "\n";
     $edit['url_required'] = 'http://example.com/   ';
-    $values = drupal_json_decode($this->drupalPostForm('form-test/url', $edit, 'Submit'));
+    $values = Json::decode($this->drupalPostForm('form-test/url', $edit, 'Submit'));
     $this->assertIdentical($values['url'], '');
     $this->assertEqual($values['url_required'], 'http://example.com/');
 
     $edit = array();
     $edit['url'] = 'http://foo.bar.example.com/';
     $edit['url_required'] = 'http://drupal.org/node/1174630?page=0&foo=bar#new';
-    $values = drupal_json_decode($this->drupalPostForm('form-test/url', $edit, 'Submit'));
+    $values = Json::decode($this->drupalPostForm('form-test/url', $edit, 'Submit'));
     $this->assertEqual($values['url'], $edit['url']);
     $this->assertEqual($values['url_required'], $edit['url_required']);
   }
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php
index a84f400..7664745 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php
@@ -262,7 +262,7 @@ function testTermAutocompletion() {
     $path = 'taxonomy/autocomplete/node/taxonomy_' . $this->vocabulary->id();
     // The result order is not guaranteed, so check each term separately.
     $result = $this->drupalGet($path, array('query' => array('q' => $input)));
-    $data = drupal_json_decode($result);
+    $data = Json::decode($result);
     $this->assertEqual($data[0]['label'], check_plain($first_term->label()), 'Autocomplete returned the first matching term');
     $this->assertEqual($data[1]['label'], check_plain($second_term->label()), 'Autocomplete returned the second matching term');
 
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
index eaa9f1d..c8e7254 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
@@ -11,6 +11,7 @@
 
 use Drupal\views\Views;
 use Drupal\Core\Template\Attribute;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests the handling of displays in the UI, adding removing etc.
@@ -312,7 +313,7 @@ public function testPageContextualLinks() {
     $post = array('ids[0]' => $id);
     $response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-display')));
     $this->assertResponse(200);
-    $json = drupal_json_decode($response);
+    $json = Json::decode($response);
     $this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="views-uiedit"><a href="' . base_path() . 'admin/structure/views/view/test_display/edit/page_1">Edit view</a></li></ul>');
   }
 
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php
index 77cc434..ded595c 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php
@@ -6,6 +6,7 @@
  */
 
 namespace Drupal\views_ui\Tests;
+use Drupal\Component\Utility\Json;
 
 /**
  * Tests the preview form in the UI.
@@ -235,7 +236,7 @@ protected function clickPreviewLinkAJAX($url, $row_count) {
     );
     $url = $this->getAbsoluteUrl($url);
     $post = array('js' => 'true') + $this->getAjaxPageStatePostData();
-    $result = drupal_json_decode($this->drupalPost($url, 'application/vnd.drupal-ajax', $post));
+    $result = Json::decode($this->drupalPost($url, 'application/vnd.drupal-ajax', $post));
     if (!empty($result)) {
       $this->drupalProcessAjaxResponse($content, $result, $ajax_settings, $drupal_settings);
     }
