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
            };
        }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM