public string PrettyPrint()
        {
            string originalValue = ToString();

            if (string.IsNullOrEmpty(originalValue))
            {
                return(string.Empty);
            }

            var originalString = new StringBuffer(originalValue);

            var prettyString = new StringBuffer();

            int       indentLevel = 0;
            const int indentSize  = 4;

            do
            {
                switch (originalString.PeekStart())
                {
                case SpChar_BeginComplexValue:
                    prettyString.PushToEnd('\r', '\n');
                    prettyString.PushToEnd(' ', indentLevel * indentSize);
                    indentLevel++;
                    prettyString.PushToEnd(originalString.PopFromStart());
                    prettyString.PushToEnd('\r', '\n');
                    prettyString.PushToEnd(' ', indentLevel * indentSize);
                    prettyString.PushToEnd(originalString.PopFromStart());
                    break;

                case SpChar_ValueDelimiter:
                    prettyString.PushToEnd(originalString.PopFromStart());

                    if (originalString.IsEmpty || originalString.PeekStart() == SpChar_FinishComplexValue)
                    {
                        indentLevel--;
                    }

                    prettyString.PushToEnd('\r', '\n');
                    prettyString.PushToEnd(' ', indentLevel * indentSize);

                    break;

                case SpChar_CommentBlock:
                    prettyString.PushToEnd(originalString.PopFromStart());

                    do
                    {
                        prettyString.PushToEnd(originalString.PopFromStart());
                    } while (!originalString.IsEmpty && prettyString.PeekEnd() != SpChar_CommentBlock);

                    prettyString.PushToEnd('\r', '\n');
                    prettyString.PushToEnd(' ', indentLevel * indentSize);
                    break;

                case SpChar_KeyDelimiter:
                    prettyString.PushToEnd(originalString.PopFromStart());
                    prettyString.PushToEnd(' ');     // Add a space after every KeyDelilmiter
                    break;

                default:
                    prettyString.PushToEnd(originalString.PopFromStart());
                    break;
                }
            } while (!originalString.IsEmpty);

            return(prettyString.ToString());
        }