Exemplo n.º 1
0
        public void parseJson(string json)
        {
            mNewsArticles.Clear();

            Util.JsonParser parser = new Util.JsonParser();
            parser.addListener(this);

            parser.parseString(json);

            if (mCurrNewsArticle != null && mCurrNewsArticle.Title != "")
            {
                mNewsArticles.Add(mCurrNewsArticle);
                mCurrNewsArticle = new NewsArticle();
            }

            foreach (NewsArticleManagerListener listener in mListeners)
            {
                listener.onParsed(this);
            }
        }
Exemplo n.º 2
0
        public void parseJson(string json)
        {
            clear();

            Util.JsonParser parser = new Util.JsonParser();
            parser.addListener(this);

            parser.parseString(json);

            if (mCurrQuote != null && mCurrQuote.Code != "")
            {
                mQuotes[mCurrQuote.Code] = mCurrQuote;
                mCurrQuote = new Quote();
            }

            foreach (QuoteManagerListener listener in mListeners)
            {
                listener.onParsed(this);
            }
        }