Commit 463bebdc authored by alexpott's avatar alexpott

Issue #2300843 by joshi.rohit100: Remove drupal_json_encode() and...

Issue #2300843 by joshi.rohit100: Remove drupal_json_encode() and drupal_json_decode() methods as deprecated.
parent 36c7a10c
......@@ -2494,36 +2494,6 @@ function drupal_clear_js_cache() {
file_scan_directory('public://js', '/.*/', array('callback' => 'drupal_delete_file_if_stale'));
}
/**
* Converts a PHP variable into its JavaScript equivalent.
*
* We use HTML-safe strings, with several characters escaped.
*
* @see drupal_json_decode()
*
* @ingroup php_wrappers
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal\Component\Serialization\Json::encode().
*/
function drupal_json_encode($var) {
return Json::encode($var);
}
/**
* Converts an HTML-safe JSON string into its PHP equivalent.
*
* @see drupal_json_encode()
*
* @ingroup php_wrappers
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal\Component\Serialization\Json::decode().
*/
function drupal_json_decode($var) {
return Json::decode($var);
}
/**
* Stores the current page in the cache.
*
......
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