示例#1
0
        public List <string> GetKeys()
        {
            if (!this.isModel)
            {
                return(null);
            }
            List <string> list = new List <string>();

            foreach (string str in base._GetCollection(this.rawjson))
            {
                string key = new CommonJsonModel(str).Key;
                if (!string.IsNullOrEmpty(key))
                {
                    list.Add(key);
                }
            }
            return(list);
        }
示例#2
0
 public string GetValue(string key)
 {
     if (this.isModel)
     {
         if (string.IsNullOrEmpty(key))
         {
             return(null);
         }
         foreach (string str in base._GetCollection(this.rawjson))
         {
             CommonJsonModel model = new CommonJsonModel(str);
             if (model.IsValue() && (model.Key == key))
             {
                 return(model.Value);
             }
         }
     }
     return(null);
 }