码迷,mamicode.com
首页 > Web开发 > 详细

解析 Json 相关

时间:2014-09-01 19:29:13      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:des   style   color   os   io   java   ar   for   div   

statusJson sj = new statusJson()
{
    ShipmentNum = "555555",
    Status1 = "05",
    Warehouse = "SHANGHAI",
    Company = "AAA"
};
 
List<statusJson> sjlist = new List<statusJson>()
{
    new statusJson()
    {
      ShipmentNum = "555557",
      Status1 = "200",
      Warehouse = "SHANGHAI",
      Company = "AAA"  
    },
    new statusJson()
    {
      ShipmentNum = "555558",
      Status1 = "200",
      Warehouse = "SHANGHAI",
      Company = "AAA"  
    }
};
string getJson = SerializationHelper.ObjecttoJson(sjlist);
 
public string UpdateStatus(string getJson)
{
    List<statusJson> strstatus = JavaScriptHelper.JSONtoObject<List<statusJson>>(getJson);           
    try
    {
        foreach (statusJson st in strstatus)
        {
            string oldstatus = "";
            string newstatus = st.Status1;
            string restatus = reStatus(newstatus);
            string Shipment_ID = st.ShipmentNum;
        }
    }    
}

解析 Json 相关

标签:des   style   color   os   io   java   ar   for   div   

原文地址:http://www.cnblogs.com/porray/p/3949790.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!