Commit 26817505 authored by webchick's avatar webchick

Issue #2208609 by sun, Jalandhar, damiankloip: Move Json utility class into...

Issue #2208609 by sun, Jalandhar, damiankloip: Move Json utility class into Drupal\Component\Serialization.
parent c9711dc8
......@@ -8,8 +8,8 @@
* a cached page are instead located in bootstrap.inc.
*/
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\Json;
use Drupal\Component\Utility\Number;
use Drupal\Component\Utility\Settings;
use Drupal\Component\Utility\SortArray;
......@@ -2824,7 +2824,7 @@ function drupal_clear_js_cache() {
* @ingroup php_wrappers
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal\Component\Utility\Json::encode().
* Use \Drupal\Component\Serialization\Json::encode().
*/
function drupal_json_encode($var) {
return Json::encode($var);
......@@ -2838,7 +2838,7 @@ function drupal_json_encode($var) {
* @ingroup php_wrappers
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal\Component\Utility\Json::decode().
* Use \Drupal\Component\Serialization\Json::decode().
*/
function drupal_json_decode($var) {
return Json::decode($var);
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\Component\Utility\Json.
* Contains \Drupal\Component\Serialization\Json.
*/
namespace Drupal\Component\Utility;
namespace Drupal\Component\Serialization;
/**
* Provides helpers for dealing with json.
......
......@@ -6,8 +6,8 @@
namespace Drupal\Core\Asset;
use Drupal\Component\Serialization\Json;
use Drupal\Core\State\StateInterface;
use Drupal\Component\Utility\Json;
/**
* Renders JavaScript assets.
......
......@@ -7,7 +7,7 @@
namespace Drupal\Core\Utility;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\String;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Path\AliasManagerInterface;
......
......@@ -8,7 +8,7 @@
namespace Drupal\block;
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\String;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
......
......@@ -7,7 +7,7 @@
namespace Drupal\block\Tests\Views;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\String;
use Drupal\views\Views;
use Drupal\views\Tests\ViewTestBase;
......
......@@ -7,7 +7,7 @@
namespace Drupal\comment\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Language\Language;
use Drupal\comment\CommentInterface;
......
......@@ -7,7 +7,7 @@
namespace Drupal\config_translation\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Config\FileStorage;
use Drupal\Core\Language\Language;
......
......@@ -7,7 +7,7 @@
namespace Drupal\content_translation\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\node\Entity\NodeType;
use Drupal\simpletest\WebTestBase;
......
......@@ -5,7 +5,7 @@
* Adds contextual links to perform actions related to elements on a page.
*/
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Template\Attribute;
......
......@@ -7,10 +7,10 @@
namespace Drupal\contextual\Plugin\views\field;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\UrlHelper;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\ResultRow;
use Drupal\Component\Utility\Json;
/**
* Provides a handler that adds contextual links.
......
......@@ -7,7 +7,7 @@
namespace Drupal\contextual\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
use Drupal\Core\Template\Attribute;
......
......@@ -7,7 +7,7 @@
namespace Drupal\editor\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
use Drupal\Component\Utility\String;
......
......@@ -7,7 +7,7 @@
namespace Drupal\editor\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
/**
......
......@@ -7,7 +7,7 @@
namespace Drupal\editor\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Language\Language;
use Drupal\quickedit\EditorSelector;
use Drupal\quickedit\MetadataGenerator;
......
......@@ -7,7 +7,7 @@
namespace Drupal\entity_reference\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\String;
use Drupal\Component\Utility\Tags;
use Drupal\entity_reference\EntityReferenceController;
......
......@@ -7,7 +7,7 @@
namespace Drupal\history\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
/**
......
......@@ -10,7 +10,7 @@
* object files are supported.
*/
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Component\Utility\Xss;
use Drupal\Core\Cache\Cache;
......
......@@ -7,7 +7,7 @@
namespace Drupal\menu_ui\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
/**
* Defines a test class for testing menu and menu link functionality.
......
......@@ -7,7 +7,7 @@
namespace Drupal\node\Tests\Views;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Symfony\Component\HttpFoundation\Request;
/**
......
......@@ -7,7 +7,7 @@
namespace Drupal\quickedit\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Language\Language;
use Drupal\simpletest\WebTestBase;
......
......@@ -7,7 +7,7 @@
namespace Drupal\quickedit\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
use Drupal\quickedit\Ajax\MetadataCommand;
use Drupal\Core\Ajax\AppendCommand;
......
......@@ -7,7 +7,7 @@
namespace Drupal\rest\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
/**
* Tests resource creation on user, node and test entities.
......
......@@ -7,7 +7,7 @@
namespace Drupal\rest\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\rest\Tests\RESTTestBase;
/**
......
......@@ -7,7 +7,7 @@
namespace Drupal\rest\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Language\Language;
use Drupal\rest\Tests\RESTTestBase;
......
......@@ -7,7 +7,7 @@
namespace Drupal\rest\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\rest\Tests\RESTTestBase;
/**
......
......@@ -7,8 +7,8 @@
namespace Drupal\simpletest;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\Json;
use Drupal\Component\Utility\NestedArray;
use Drupal\Component\Utility\String;
use Drupal\Component\Utility\Xss;
......
......@@ -7,7 +7,7 @@
namespace Drupal\system\Controller;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Entity\Query\QueryFactory;
use Drupal\Core\Extension\ThemeHandlerInterface;
......
......@@ -7,7 +7,7 @@
namespace Drupal\system\Tests\Common;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\DrupalUnitTestBase;
use Drupal\Component\Utility\Crypt;
......
......@@ -7,8 +7,8 @@
namespace Drupal\system\Tests\Common;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\Json;
use Drupal\Core\Render\Element;
use Drupal\simpletest\DrupalUnitTestBase;
......
......@@ -7,7 +7,7 @@
namespace Drupal\system\Tests\Form;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
/**
......
......@@ -7,7 +7,7 @@
namespace Drupal\system\Tests\Form;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\String;
use Drupal\Core\Render\Element;
use Drupal\simpletest\WebTestBase;
......
......@@ -7,7 +7,7 @@
namespace Drupal\system\Tests\Form;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
use Drupal\Core\Language\Language;
......
......@@ -7,7 +7,7 @@
namespace Drupal\system\Tests\Form;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
/**
......
......@@ -7,7 +7,7 @@
namespace Drupal\system\Tests\Form;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\simpletest\WebTestBase;
/**
......
......@@ -7,8 +7,8 @@
namespace Drupal\system\Tests\Controller;
use Drupal\Component\Serialization\Json;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Component\Utility\Json;
use Drupal\Core\Template\Attribute;
use Drupal\system\Controller\SystemController;
use Drupal\Tests\UnitTestCase;
......
......@@ -5,7 +5,7 @@
* Helper module for the form API tests.
*/
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Core\Database\Database;
use Drupal\Core\Language\Language;
use Drupal\form_test\Callbacks;
......
......@@ -7,7 +7,7 @@
namespace Drupal\taxonomy\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Tags;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Component\Utility\String;
......
......@@ -6,7 +6,8 @@
*/
namespace Drupal\views\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
/**
* Tests the ajax view functionality.
......
......@@ -7,7 +7,7 @@
namespace Drupal\views_ui\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\String;
use Drupal\views\Views;
......
......@@ -7,7 +7,7 @@
namespace Drupal\views_ui\Tests;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
/**
* Tests the preview form in the UI.
......
......@@ -2,18 +2,18 @@
/**
* @file
* Contains \Drupal\Tests\Component\Utility\JsonTest.
* Contains \Drupal\Tests\Component\Serialization\JsonTest.
*/
namespace Drupal\Tests\Component\Utility;
namespace Drupal\Tests\Component\Serialization;
use Drupal\Component\Utility\Json;
use Drupal\Component\Serialization\Json;
use Drupal\Tests\UnitTestCase;
/**
* Tests the Json::encode() and Json::decode() functions.
*
* @see \Drupal\Component\Utility\Json
* @see \Drupal\Component\Serialization\Json
*/
class JsonTest extends UnitTestCase {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment