private object ReadToken(StreamReader sr)
        {
            EatWhitespace(sr);

            char c = sr.ReadChar();
            switch (c)
            {
                case '{':
                    return ReadDict(sr);
                case '/':
                    {
                        if (sr.PeekChar() == '/')
                        {
                            sr.ReadLine();
                            return null;
                        }
                        else
                        {
                            return ReadString(sr, c);
                        }
                    }

                default:
                    return ReadString(sr, c);
            }
        }
 private void EatWhitespace(StreamReader sr)
 {
     while (char.IsWhiteSpace(sr.PeekChar()))
     {
         sr.ReadChar();
     }
 }
        private Dictionary<string, object> ReadDict(StreamReader sr)
        {
            Dictionary<string, object> dict = new Dictionary<string, object>(StringComparer.InvariantCultureIgnoreCase);

            EatWhitespace(sr);
            while (sr.PeekChar() != '}')
            {
                EatWhitespace(sr);
                object keyToken = ReadToken(sr);
                if (keyToken != null)
                {
                    string key = (string)keyToken;
                    object value = ReadToken(sr);
                    dict.Add(key, value);
                }
                EatWhitespace(sr);
            }
            sr.ReadChar(); // eat the }

            return dict;
        }