首页 新闻 会员 周边 捐助

JSON To DataTable 带小数点数字 被四舍五入了?请问这是怎么回事?

0
悬赏园豆:10 [已关闭问题] 关闭于 2013-07-19 09:48

使用 JsonConvert.DeserializeObject();

例如:{"phasecodeandname":"010101 土地出让金","costobject":"","sumbudgetamount":500000000,"contractamt":0,"allocamt":44397975.8,"allocreservedamt":11099492.44,"actualoverbalance":-444502531.76,"costcodeid":"14154","costallocid":"19862","fullid":"197.14154.","RowState":"Modified"}

JSON:[{"phasecodeandname":"上海黄浦万达广场分期一","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":30000,"allocreservedamt":0,"actualoverbalance":0,"costcodeid":"-1","costallocid":"109","fullid":"109.","RowState":"Unchanged"},{"phasecodeandname":"010201 补偿合作方地价","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":10000,"allocreservedamt":0,"actualoverbalance":0,"costcodeid":"12427","costallocid":"19866","fullid":"109.12427.","RowState":"Unchanged"},{"phasecodeandname":"","costobject":"黄浦万达广场分期一A区","sumbudgetamount":0,"contractamt":0,"allocamt":10000,"allocreservedamt":0,"actualoverbalance":0,"costcodeid":"12427","costallocid":"19867","fullid":"109.12427.116.","RowState":"Unchanged"},{"phasecodeandname":"010202 合作项目建房转入分给合作方的房屋成本","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":10000,"allocreservedamt":0,"actualoverbalance":0,"costcodeid":"12428","costallocid":"19868","fullid":"109.12428.","RowState":"Unchanged"},{"phasecodeandname":"","costobject":"黄浦万达广场分期一A区","sumbudgetamount":0,"contractamt":0,"allocamt":10000,"allocreservedamt":0,"actualoverbalance":0,"costcodeid":"12428","costallocid":"19869","fullid":"109.12428.116.","RowState":"Unchanged"},{"phasecodeandname":"010299 其他合作款项","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":10000,"allocreservedamt":0,"actualoverbalance":0,"costcodeid":"12429","costallocid":"19870","fullid":"109.12429.","RowState":"Unchanged"},{"phasecodeandname":"","costobject":"黄浦万达广场分期一A区","sumbudgetamount":0,"contractamt":0,"allocamt":10000,"allocreservedamt":0,"actualoverbalance":0,"costcodeid":"12429","costallocid":"19871","fullid":"109.12429.116.","RowState":"Unchanged"},{"phasecodeandname":"黄埔万达广场分期二","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":82601583.46,"allocreservedamt":20650395.86,"actualoverbalance":0,"costcodeid":"-1","costallocid":"118","fullid":"118.","RowState":"Modified"},{"phasecodeandname":"010101 土地出让金","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":30022655.46,"allocreservedamt":7505663.86,"actualoverbalance":37528319.32,"costcodeid":"12699","costallocid":"19859","fullid":"118.12699.","RowState":"Modified"},{"phasecodeandname":"010102 市政基础设施配套费","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":30022656,"allocreservedamt":7505664,"actualoverbalance":0,"costcodeid":"12700","costallocid":"19860","fullid":"118.12700.","RowState":"Unchanged"},{"phasecodeandname":"010103 契税","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":22556272,"allocreservedamt":5639068,"actualoverbalance":0,"costcodeid":"12701","costallocid":"19861","fullid":"118.12701.","RowState":"Unchanged"},{"phasecodeandname":"黄埔万达广场分期三","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":177591897.8,"allocreservedamt":44397974.44,"actualoverbalance":0,"costcodeid":"-1","costallocid":"197","fullid":"197.","RowState":"Modified"},{"phasecodeandname":"010101 土地出让金","costobject":"","sumbudgetamount":500000000,"contractamt":0,"allocamt":44397975.8,"allocreservedamt":11099492.44,"actualoverbalance":-444502531.76,"costcodeid":"14154","costallocid":"19862","fullid":"197.14154.","RowState":"Modified"},{"phasecodeandname":"010102 市政基础设施配套费","costobject":"","sumbudgetamount":200000000,"contractamt":0,"allocamt":44397974,"allocreservedamt":11099494,"actualoverbalance":-200000000,"costcodeid":"14155","costallocid":"19863","fullid":"197.14155.","RowState":"Unchanged"},{"phasecodeandname":"010103 契税","costobject":"","sumbudgetamount":20000000,"contractamt":0,"allocamt":44397974,"allocreservedamt":11099494,"actualoverbalance":-20000000,"costcodeid":"14156","costallocid":"19864","fullid":"197.14156.","RowState":"Unchanged"},{"phasecodeandname":"010104 土地使用费","costobject":"","sumbudgetamount":0,"contractamt":0,"allocamt":44397974,"allocreservedamt":11099494,"actualoverbalance":0,"costcodeid":"14444","costallocid":"19865","fullid":"197.14444.","RowState":"Unchanged"}]

402786886zy的主页 402786886zy | 初学一级 | 园豆:96
提问于:2013-07-18 22:53
< >
分享
所有回答(2)
0

字段定义成了int型?

二十三号同学 | 园豆:974 (小虾三级) | 2013-07-19 09:10
0

因为第一条 记录 数字没有小数点,组合json时没有处理数字字段的格式

402786886zy | 园豆:96 (初学一级) | 2013-07-19 09:44
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册