Exemple #1
0
        public ListTerms ListTerms(string json)
        {
            // the implementation here differs, but its JSON return format is slightly different than the others, and
            // is unlikely to be used frequently.
            ListTerms listTerms = new ListTerms();
            JObject   o         = JObject.Parse(json);
            var       names     = o["response"]["terms"];

            listTerms.type = o["response"]["type"].ToString();

            foreach (var i in names)
            {
                listTerms.terms.Add(i["name"].ToString());
            }
            return(listTerms);
        }
Exemple #2
0
        public ListTerms ListTerms(string json)
        {
            // the implementation here differs, but its JSON return format is slightly different than the others, and
            // is unlikely to be used frequently.
            ListTerms listTerms = new ListTerms();
            JObject o = JObject.Parse(json);
            var names = o["response"]["terms"];
            listTerms.type = o["response"]["type"].ToString();

            foreach (var i in names)
            {
                listTerms.terms.Add(i["name"].ToString());
            }
            return listTerms;
        }