Skip to content
Snippets Groups Projects
Commit 463bebdc authored by Alex Pott's avatar Alex Pott
Browse files

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
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment