code: private function parseJson(array $token)
      {
          $value = json_decode($token['value'], true);
  
          if ($error = json_last_error()) {
              // Legacy support for elided quotes. Try to parse again by adding
              // quotes around the bad input value.
              $value = json_decode('"' . $token['value'] . '"', true);
              if ($error = json_last_error()) {
                  $token['type'] = self::T_UNKNOWN;
                  return $token;
              }
          }
  
          $token['value'] = $value;
          return $token;
      }
docs: Parses a JSON token or sets the token type to "unknown" on error.
  
  @param array $token Token that needs parsing.
  
  @return array Returns a token with a parsed value.