相关疑难解决方法(0)

为什么这个JSON返回为"无效的JSON原语"?

以下JSON未反序列化.这显然是因为DECIMALS在保存JSON中.我该如何解决?

这个初始JSON来自服务器和IS VALID:

    {
    "AppropriationAmount": 25000000, 
    "AppropriationHours": 56300, 
    "ArrThreshold": 11, 
    "ClientKey": 24, 
    "Description": 'Find and incarcerate the escaped prisoner', 
    "DirectHours": 50000, 
    "EndDate": '3/31/2011', 
    "EngineeringHours": 4000, 
    "IndirectHours": 2000, 
    "Key": 1589, 
    "Number": '0', 
    "OtherHours": 300, 
    "ProductivityCurveType": 'BurnedEarned', 
    "ProjectManager": 'Doctor Who', 
    "ProjectName": 'Prisoner ZERO', 
    "StartDate": '5/1/2010' 
    }
Run Code Online (Sandbox Code Playgroud)

这个随后的JSON发送到服务器FAILS:
一旦用户编辑了表单,数据就被客户端序列化并发送回来......在尝试反序列化JSON时它(然后)失败.

    {
    "AppropriationAmount": 56300.00, 
    "AppropriationHours": 25000000.00, 
    "ArrThreshold": 11.00, 
    "ClientKey": , 
    "Description": 'Find and incarcerate the escaped prisoner', 
    "DirectHours": 50000.00, 
    "EndDate": '3/31/2011', 
    "EngineeringHours": 4000.00, 
    "IndirectHours": 2000.00, 
    "Key": 1589, 
    "Number": '0', 
    "OtherHours": 300.00, 
    "ProductivityCurveType": 'BurnedEarned', 
    "ProjectManager": 'Doctor …
Run Code Online (Sandbox Code Playgroud)

asp.net serialization json deserialization

8
推荐指数
2
解决办法
4万
查看次数

标签 统计

asp.net ×1

deserialization ×1

json ×1

serialization ×1