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.
    }