original_string: protected function getScriptJson(array $tag_frag, $test_for_json = true)
      {
          if (empty($tag_frag['script_json'])) {
              return ''; // Not possible; no JSON code.
          }
          if ($test_for_json && !$this->isScriptTagFragJson($tag_frag)) {
              return ''; // This script tag does not contain JSON.
          }
          return trim($tag_frag['script_json']); // JSON code.
      }
code: protected function getScriptJson(array $tag_frag, $test_for_json = true)
      {
          if (empty($tag_frag['script_json'])) {
              return ''; // Not possible; no JSON code.
          }
          if ($test_for_json && !$this->isScriptTagFragJson($tag_frag)) {
              return ''; // This script tag does not contain JSON.
          }
          return trim($tag_frag['script_json']); // JSON code.
      }
code_tokens: protected function getScriptJson ( array $ tag_frag , $ test_for_json = true ) { if ( empty ( $ tag_frag [ 'script_json' ] ) ) { return '' ; // Not possible; no JSON code. } if ( $ test_for_json && ! $ this -> isScriptTagFragJson ( $ tag_frag ) ) { return '' ; // This script tag does not contain JSON. } return trim ( $ tag_frag [ 'script_json' ] ) ; // JSON code. }
docstring: Get script JSON from a JS tag fragment.
  
  @since 150424 Adding support for JSON compression.
  
  @param array $tag_frag      A JS tag fragment.
  @param bool  $test_for_js   Defaults to a TRUE value.
  If TRUE, we will test tag fragment to make sure it's JSON.
  @param mixed $test_for_json
  
  @return string The script JSON code (if possible); else an empty string.
docstring_tokens: Get script JSON from a JS tag fragment .