function Json::decode

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

Overrides SerializationInterface::decode

68 calls to Json::decode()
AnnounceFetcher::fetch in core/modules/announcements_feed/src/AnnounceFetcher.php
Fetches the feed either from a local cache or fresh remotely.
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.

... 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.