Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. JsonDecoder.php

function JsonDecoder::decode

Return value

mixed

File

vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php, line 10

Class

JsonDecoder

Namespace

PhpParser

Code

public function decode(string $json) {
    $value = json_decode($json, true);
    if (json_last_error()) {
        throw new \RuntimeException('JSON decoding error: ' . json_last_error_msg());
    }
    return $this->decodeRecursive($value);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal