protected function indentPrettyPrintedJson($jsonString, $indentStyle, $defaultIndentSize = 2)
    {
        $indentChar = $this->getIndentCharForIndentStyle($indentStyle);
        $indentSize = $this->getPrettyPrintIndentSize() ?: $defaultIndentSize;

        // If the given indentation style is allowed to have various indent size
        // (number of chars, that are used to indent one level in each line),
        // indent the JSON string with given (or default) indent size.
        if ($this->hasVariousIndentSize($indentStyle)) {
            return $this->peformIndentation($jsonString, $indentChar, $indentSize);
        }

        // Otherwise following the convention, that indent styles, that does not
        // allowed to have various indent size (e.g. tab) are indented using
        // one tabulation character per one indent level in each line.
        return $this->peformIndentation($jsonString, $indentChar);
    }