public Newtonsoft.Json.Linq.JArray processer(string jsonStr) { String userID = null; String pTypeID = null; JArray jsa = JArray.Parse(jsonStr); JObject json = JObject.Parse(jsa[0].ToString()); userID = json["userID"].ToString(); pTypeID = json["pTypeID"].ToString(); ProductModel m = (ProductModel)new ProductDao().getModel(pTypeID); JArray ja = new JArray(); json = new ProductRowMapper().mappingRow(m); ja.Add(json); return ja; }
public Newtonsoft.Json.Linq.JArray processer(string jsonStr) { String userID = null; JArray jsa = JArray.Parse(jsonStr); JObject json = JObject.Parse(jsa[0].ToString()); userID = json["userID"].ToString(); List<Model> ms = new ProductDao().getBigType(userID); JArray ja = new JArray(); foreach (Model m in ms) { JObject js = new JObject(); js = new ProductRowMapper().mappingRow(m); ja.Add(js); } return ja; }