110,500
社区成员
发帖
与我相关
我的任务
分享
"total":"3","rows":[{"ip":"192.168.1","nowversionname":"1.0","lasttime":"2009.2.2","unitcost":"[
{
"fileName": "神之佑",
"fileVersion": "V4.0",
"lastTime": "2008.08.08"
}
]"},{"ip":"192.168.2","nowversionname":"1.0","lasttime":"2009.2.3","unitcost":"[
{
"fileName": "h.exe",
"fileVersion": "V4.2",
"lastTime": "2008.08.08"
}
]"},{"ip":"192.168.3","nowversionname":"1.2","lasttime":"2009.2.9","unitcost":"[
{
"fileName": "h.exe",
"fileVersion": "V5.2",
"lastTime": "2008.08.08"
}
]"}]}
"unitcost":"[
{
"fileName": "神之佑",
"fileVersion": "V4.0",
"lastTime": "2008.08.08"
}
]"
class Model
{
public string UnitCost {get; set;}
public UnitCost[] UnitCosts
{
get
{
if(this._unitCost == null)
{
this._unitCost = JsonSerializer.Deserialize<UnitCost[]>(this.UnitCost);
}
return this._unitCost;
}
}
}
[/quote]
嗯,我用的匿名类。。,现在的方法是使用替换发把"{0}"替换成另个list的json
"unitcost":"[
{
"fileName": "神之佑",
"fileVersion": "V4.0",
"lastTime": "2008.08.08"
}]"
[/quote]
换个类库吧。。。都不给双引号转义,要它何用= =[/quote]
有引号转义,我又转回来了。。
"unitcost":"[
{
"fileName": "神之佑",
"fileVersion": "V4.0",
"lastTime": "2008.08.08"
}]"
[/quote]
换个类库吧。。。都不给双引号转义,要它何用= =class Model
{
public string UnitCost {get; set;}
public UnitCost[] UnitCosts
{
get
{
if(this._unitCost == null)
{
this._unitCost = JsonSerializer.Deserialize<UnitCost[]>(this.UnitCost);
}
return this._unitCost;
}
}
}
"unitcost":"[
{
"fileName": "神之佑",
"fileVersion": "V4.0",
"lastTime": "2008.08.08"
}]"