JsonConvert.SerializeObject() 输出josn格式 也就是序列化。

JsonConvert.SerializeObject() 输出josn格式  也就是序列化。

JSON.parse 反序列化  http://www.cnblogs.com/ahlx/p/5228048.html

 

 

  public JsonResult GetMobileProductInfo(string mobile)
        {
            int time = DateTime.Now.Minute;
            //string url = System.Configuration.ConfigurationManager.AppSettings["mingdao_gsd"].ToString();

            //string response = MDCRM.Framework.Common.DoGetRequest(url.Replace("{0}",mobile).Replace("#","&"));
            string address = MDCRM.Business.LeadBusiness.GetMobileAddress(mobile);
            JObject json = new JObject()
            {
                {"address",address}
            };
            //mingdao5 admin   app 11999    sign  ebe216651b277e74ae27ac53bad091a8
            return new JsonResult()
            {
                Data = JsonConvert.SerializeObject(json),
                ContentType = "application/json",
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }

 

posted @ 2016-02-29 16:53  MaoSan-Jerry  阅读(10157)  评论(0编辑  收藏  举报