Error message
You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).function drupal_json_decode
Converts an HTML-safe JSON string into its PHP equivalent.
See also
Related topics
- PHP wrapper functions
- Functions that are wrappers or custom implementations of PHP functions.
10 calls to drupal_json_decode()
- announce_feed_test_set_feed_config in modules/
announcements_feed/ tests/ announce_feed_test.module - Helper function to set announcements feed URL.
- DrupalJSONTest::testJSON in modules/
simpletest/ tests/ common.test - Tests converting PHP variables to JSON strings and back.
- DrupalWebTestCase::drupalGetAJAX in modules/
simpletest/ drupal_web_test_case.php - Retrieve a Drupal path or an absolute path and JSON decode the result.
- DrupalWebTestCase::drupalPostAJAX in modules/
simpletest/ drupal_web_test_case.php - Execute an Ajax submission.
- DrupalWebTestCase::drupalSetContent in modules/
simpletest/ drupal_web_test_case.php - Sets the raw HTML content. This can be useful when a page has been fetched outside of the internal browser and assertions need to be made on the returned page.
File
-
includes/
common.inc, line 5308
Code
function drupal_json_decode ($var) {
return json_decode ($var, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.