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

Breadcrumb

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

function JsonParser::stringInterpolation

Parameters

string $match:

Return value

string

File

vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php, line 560

Class

JsonParser
Parser class

Namespace

Seld\JsonLint

Code

private function stringInterpolation($match) {
    switch ($match[0]) {
        case '\\\\':
            return '\\';
        case '\\"':
            return '"';
        case '\\b':
            return \chr(8);
        case '\\f':
            return \chr(12);
        case '\\n':
            return "\n";
        case '\\r':
            return "\r";
        case '\\t':
            return "\t";
        case '\\/':
            return "/";
        default:
            return html_entity_decode('&#x' . ltrim(substr($match[0], 2), '0') . ';', ENT_QUOTES, 'UTF-8');
    }
}

API Navigation

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