JSON字符串反序列化时,碰到JSON嵌套的问题,所以写这些当做个笔记。
#1 JSON字符串
string voucherJson = "{\"voucherList\":
[
{
\"voucherName\":\"团购代金券测试testhahah1测试\",
\"voucherID\":\"9907\",
\"voucherMoney\":\"10000\",
\"voucherValue\":\"20\",
\"getDateBegin\":\"2015-09-10\",
\"getDateEnd\":\"2015-09-15\",
\"useDateBegin\":\"2015-09-11\",
\"useDateEnd\":\"2015-09-21\",
\"voucherDept\":\"财务部\",
\"applationBy\":\"Test\",
\"area\":\"[上海]\",
\"acitictyJson\":[
{
\"actName\":\"12月11日上团携手圣象地板首次专场团购会\",
\"actTime\":\"2014-06-17\",
\"area\":\"上海\",
\"actType\":\"专场\",
\"buiness\":\"建材\"
},
{
\"actName\":\"12月11日蒙娜丽莎瓷砖专场团购会\",
\"actTime\":\"2014-06-20\",
\"area\":\"上海\",
\"actType\":\"专场\",
\"buiness\":\"建材\"
},
{
\"actName\":\"书香门地地板专场\",
\"actTime\":\"2014-12-13\",
\"area\":\"上海\",
\"actType\":\"专场\",
\"buiness\":\"建材\"
}
],
\"merchantJson\": [],
\"remark\":\"备注备注备注备注备注备注备注备注备注备注备注备注备注备注\",
\"applicationDept\":\"财务部\",
\"appByEmail\":\"test@test.com\",
\"unplanned\":\"false\",
\"workId\":\"\"
},
{
\"voucherName\":\"团购代金券测试testhahah2测试\",
\"voucherID\":\"9908\",
\"voucherMoney\":\"10000\",
\"voucherValue\":\"20\",
\"getDateBegin\":\"2015-09-10\",
\"getDateEnd\":\"2015-09-15\",
\"useDateBegin\":\"2015-09-11\",
\"useDateEnd\":\"2015-09-21\",
\"voucherDept\":\"财务部\",
\"applationBy\":\"Test\",
\"area\":\"[上海]\",
\"acitictyJson\":[
{
\"actName\":\"12月11日上团携手圣象地板首次专场团购会\",
\"actTime\":\"2014-06-17\",
\"area\":\"上海\",
\"actType\":\"专场\",
\"buiness\":\"建材\"
},