解析 Json 相关_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > 解析 Json 相关

解析 Json 相关

 2014/9/1 21:11:17  porray  程序员俱乐部  我要评论(0)
  • 摘要:statusJsonsj=newstatusJson(){ShipmentNum="555555",Status1="05",Warehouse="SHANGHAI",Company="AAA"};List<statusJson>sjlist=newList<statusJson>(){newstatusJson(){ShipmentNum="555557",Status1="200",Warehouse="SHANGHAI",Company="AAA"}
  • 标签:JSON 解析 JS
monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">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;
        }
    }    
}
发表评论
用户名: 匿名