function Json::decode

Same name in other branches
  1. 9 core/lib/Drupal/Component/Serialization/Json.php \Drupal\Component\Serialization\Json::decode()
  2. 10 core/lib/Drupal/Component/Serialization/Json.php \Drupal\Component\Serialization\Json::decode()
  3. 11.x core/lib/Drupal/Component/Serialization/Json.php \Drupal\Component\Serialization\Json::decode()

Overrides SerializationInterface::decode

99 calls to Json::decode()
AssertContentTrait::setRawContent in core/tests/Drupal/KernelTests/AssertContentTrait.php
Sets the raw content (e.g. HTML).
AttachedAssetsTest::testSettings in core/tests/Drupal/KernelTests/Core/Asset/AttachedAssetsTest.php
Tests JavaScript settings.
BasicTest::testViewsWizardAndListing in core/modules/views/tests/src/Functional/Wizard/BasicTest.php
BrowserTestBase::getDrupalSettings in core/tests/Drupal/Tests/BrowserTestBase.php
Gets the JavaScript drupalSettings variable for the currently-loaded page.
BrowserTestBaseTest::testForm in core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
Tests basic form functionality.

... See full list

File

core/lib/Drupal/Component/Serialization/Json.php, line 25

Class

Json
Default serialization for JSON.

Namespace

Drupal\Component\Serialization

Code

public static function decode($string) {
    return json_decode($string, TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.