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

Breadcrumb

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

function GPBJsonWire::jsonNiceEscape

1 call to GPBJsonWire::jsonNiceEscape()
GPBJsonWire::escapedJson in vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php

File

vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php, line 231

Class

GPBJsonWire

Namespace

Google\Protobuf\Internal

Code

private static function jsonNiceEscape($c) {
    switch ($c) {
        case '"':
            return "\\\"";
        case '\\':
            return "\\\\";
        case '/':
            return "\\/";
        case '\\b':
            return "\\b";
        case '\\f':
            return "\\f";
        case '\\n':
            return "\\n";
        case '\\r':
            return "\\r";
        case '\\t':
            return "\\t";
        default:
            return NULL;
    }
}

API Navigation

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