1)json:
[[{"Id":6,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":3633976.6,"EstimatedPower":3529887.3134946576,"Consumption":210687.426175765,"Temperature":-16.0,"Deviation":-2.864335629055581,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":7,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":3087296.2,"EstimatedPower":2937010.8697607126,"Consumption":181808.811123168,"Temperature":-4.5,"Deviation":-4.8678623787146709,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":8,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":3789773.0,"EstimatedPower":4062749.0288516344,"Consumption":248780.849474034,"Temperature":-9.9,"Deviation":7.2029651604894163,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":9,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":4147530.6,"EstimatedPower":4013436.2063861224,"Consumption":249512.711123168,"Temperature":-4.7,"Deviation":-3.2331140272690906,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":10,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":3526440.2,"EstimatedPower":3646342.5469404678,"Consumption":234718.429474034,"Temperature":6.6,"Deviation":3.4000958513479951,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":11,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":3246991.6,"EstimatedPower":3168656.9042940191,"Consumption":211549.901123168,"Temperature":16.0,"Deviation":-2.4125315170504646,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":12,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2396363.0,"EstimatedPower":2416626.8007339239,"Consumption":159345.971123168,"Temperature":9.5,"Deviation":0.84560647672844436,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}],[{"Id":114,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":1021862.2,"EstimatedPower":1076057.4491338292,"Consumption":89701.7655810564,"Temperature":-16.0,"Deviation":5.3035770511747238,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":115,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":1144715.8,"EstimatedPower":1108039.9497605087,"Consumption":89681.9904647411,"Temperature":-4.5,"Deviation":-3.2039262705635174,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":116,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":1074957.4,"EstimatedPower":1182082.0678394337,"Consumption":96818.4488368462,"Temperature":-9.9,"Deviation":9.9654802915384089,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":117,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":1243359.8,"EstimatedPower":1239392.9877877974,"Consumption":100238.590464741,"Temperature":-4.7,"Deviation":-0.31903976726629368,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":118,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":1094505.4,"EstimatedPower":1239985.6629106368,"Consumption":97751.6488368462,"Temperature":6.6,"Deviation":13.291872558201812,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":119,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":766071.2,"EstimatedPower":1293214.0524931694,"Consumption":99903.100464741,"Temperature":16.0,"Deviation":68.811208735319823,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":120,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2048921.6,"EstimatedPower":1243607.6504395444,"Consumption":97391.090464741,"Temperature":9.5,"Deviation":-39.304283265911963,"Excluded":[3],"IsOutlier":true,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}],[{"Id":66,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":2375411.4,"EstimatedPower":2598429.5959766749,"Consumption":241303.937741935,"Temperature":-16.0,"Deviation":9.38861352507927,"Excluded":[4],"IsOutlier":true,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":67,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":2816367.0,"EstimatedPower":2761899.1710119839,"Consumption":270116.242857143,"Temperature":-4.5,"Deviation":-1.9339748331100304,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":68,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":2885174.8,"EstimatedPower":2951451.2435807148,"Consumption":283105.451152074,"Temperature":-9.9,"Deviation":2.2971378919819596,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":69,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":3089902.2,"EstimatedPower":2900149.1745301066,"Consumption":283664.742857143,"Temperature":-4.7,"Deviation":-6.1410689784904378,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":70,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":3227620.0,"EstimatedPower":2780273.3585052835,"Consumption":284044.431152074,"Temperature":6.6,"Deviation":-13.859953820298443,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":71,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":2471207.0,"EstimatedPower":2790993.2908156421,"Consumption":295357.502857143,"Temperature":16.0,"Deviation":12.940489842236701,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":72,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2751209.6,"EstimatedPower":2848408.6166038075,"Consumption":293990.002857143,"Temperature":9.5,"Deviation":3.5329557080568286,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}]]
2)代码:
string jsonList;
List<EnergyPlanningResult> allData;
try
{
allData = JsonConvert.DeserializeObject<List<EnergyPlanningResult>>(jsonList);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
错误消息是:
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'MonitoringOfEnergyConsumption.Controllers.EnergyPlanningResult' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '[0]', line 1, position 2.
我已经检查了json文件并且它是有效的。
我不确定发生了什么。
答案 0 :(得分:1)
在这个网站上发布你的Json:http://pojo.sodhanalibrary.com并获得你匹配的java pojo。
如上所述,如果您不确定您的模型,可以在线使用许多网站直接将JSON转换为Java Pojo,使用其中一个。
答案 1 :(得分:0)
答案很简单,你的json:
[[{"Id":6,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":3633976.6,"EstimatedPower":3529887.3134946576,"Consumption":210687.426175765,"Temperature":-16.0,"Deviation":-2.864335629055581,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":7,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":3087296.2,"EstimatedPower":2937010.8697607126,"Consumption":181808.811123168,"Temperature":-4.5,"Deviation":-4.8678623787146709,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":8,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":3789773.0,"EstimatedPower":4062749.0288516344,"Consumption":248780.849474034,"Temperature":-9.9,"Deviation":7.2029651604894163,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":9,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":4147530.6,"EstimatedPower":4013436.2063861224,"Consumption":249512.711123168,"Temperature":-4.7,"Deviation":-3.2331140272690906,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":10,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":3526440.2,"EstimatedPower":3646342.5469404678,"Consumption":234718.429474034,"Temperature":6.6,"Deviation":3.4000958513479951,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":11,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":3246991.6,"EstimatedPower":3168656.9042940191,"Consumption":211549.901123168,"Temperature":16.0,"Deviation":-2.4125315170504646,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":12,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2396363.0,"EstimatedPower":2416626.8007339239,"Consumption":159345.971123168,"Temperature":9.5,"Deviation":0.84560647672844436,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}],[{"Id":114,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":1021862.2,"EstimatedPower":1076057.4491338292,"Consumption":89701.7655810564,"Temperature":-16.0,"Deviation":5.3035770511747238,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":115,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":1144715.8,"EstimatedPower":1108039.9497605087,"Consumption":89681.9904647411,"Temperature":-4.5,"Deviation":-3.2039262705635174,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":116,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":1074957.4,"EstimatedPower":1182082.0678394337,"Consumption":96818.4488368462,"Temperature":-9.9,"Deviation":9.9654802915384089,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":117,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":1243359.8,"EstimatedPower":1239392.9877877974,"Consumption":100238.590464741,"Temperature":-4.7,"Deviation":-0.31903976726629368,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":118,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":1094505.4,"EstimatedPower":1239985.6629106368,"Consumption":97751.6488368462,"Temperature":6.6,"Deviation":13.291872558201812,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":119,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":766071.2,"EstimatedPower":1293214.0524931694,"Consumption":99903.100464741,"Temperature":16.0,"Deviation":68.811208735319823,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":120,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2048921.6,"EstimatedPower":1243607.6504395444,"Consumption":97391.090464741,"Temperature":9.5,"Deviation":-39.304283265911963,"Excluded":[3],"IsOutlier":true,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}],[{"Id":66,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":2375411.4,"EstimatedPower":2598429.5959766749,"Consumption":241303.937741935,"Temperature":-16.0,"Deviation":9.38861352507927,"Excluded":[4],"IsOutlier":true,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":67,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":2816367.0,"EstimatedPower":2761899.1710119839,"Consumption":270116.242857143,"Temperature":-4.5,"Deviation":-1.9339748331100304,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":68,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":2885174.8,"EstimatedPower":2951451.2435807148,"Consumption":283105.451152074,"Temperature":-9.9,"Deviation":2.2971378919819596,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":69,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":3089902.2,"EstimatedPower":2900149.1745301066,"Consumption":283664.742857143,"Temperature":-4.7,"Deviation":-6.1410689784904378,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":70,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":3227620.0,"EstimatedPower":2780273.3585052835,"Consumption":284044.431152074,"Temperature":6.6,"Deviation":-13.859953820298443,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":71,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":2471207.0,"EstimatedPower":2790993.2908156421,"Consumption":295357.502857143,"Temperature":16.0,"Deviation":12.940489842236701,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":72,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2751209.6,"EstimatedPower":2848408.6166038075,"Consumption":293990.002857143,"Temperature":9.5,"Deviation":3.5329557080568286,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}]]
不是有效的json。这是因为双方支撑。
删除一个方形支撑,你就像json一样喜欢:
[{"Id":6,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":3633976.6,"EstimatedPower":3529887.3134946576,"Consumption":210687.426175765,"Temperature":-16.0,"Deviation":-2.864335629055581,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":7,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":3087296.2,"EstimatedPower":2937010.8697607126,"Consumption":181808.811123168,"Temperature":-4.5,"Deviation":-4.8678623787146709,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":8,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":3789773.0,"EstimatedPower":4062749.0288516344,"Consumption":248780.849474034,"Temperature":-9.9,"Deviation":7.2029651604894163,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":9,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":4147530.6,"EstimatedPower":4013436.2063861224,"Consumption":249512.711123168,"Temperature":-4.7,"Deviation":-3.2331140272690906,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":10,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":3526440.2,"EstimatedPower":3646342.5469404678,"Consumption":234718.429474034,"Temperature":6.6,"Deviation":3.4000958513479951,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":11,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":3246991.6,"EstimatedPower":3168656.9042940191,"Consumption":211549.901123168,"Temperature":16.0,"Deviation":-2.4125315170504646,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":12,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2396363.0,"EstimatedPower":2416626.8007339239,"Consumption":159345.971123168,"Temperature":9.5,"Deviation":0.84560647672844436,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}],[{"Id":114,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":1021862.2,"EstimatedPower":1076057.4491338292,"Consumption":89701.7655810564,"Temperature":-16.0,"Deviation":5.3035770511747238,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":115,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":1144715.8,"EstimatedPower":1108039.9497605087,"Consumption":89681.9904647411,"Temperature":-4.5,"Deviation":-3.2039262705635174,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":116,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":1074957.4,"EstimatedPower":1182082.0678394337,"Consumption":96818.4488368462,"Temperature":-9.9,"Deviation":9.9654802915384089,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":117,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":1243359.8,"EstimatedPower":1239392.9877877974,"Consumption":100238.590464741,"Temperature":-4.7,"Deviation":-0.31903976726629368,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":118,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":1094505.4,"EstimatedPower":1239985.6629106368,"Consumption":97751.6488368462,"Temperature":6.6,"Deviation":13.291872558201812,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":119,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":766071.2,"EstimatedPower":1293214.0524931694,"Consumption":99903.100464741,"Temperature":16.0,"Deviation":68.811208735319823,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":120,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2048921.6,"EstimatedPower":1243607.6504395444,"Consumption":97391.090464741,"Temperature":9.5,"Deviation":-39.304283265911963,"Excluded":[3],"IsOutlier":true,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}],[{"Id":66,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-02-01T00:00:00Z","Power":2375411.4,"EstimatedPower":2598429.5959766749,"Consumption":241303.937741935,"Temperature":-16.0,"Deviation":9.38861352507927,"Excluded":[4],"IsOutlier":true,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":67,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-03-01T00:00:00Z","Power":2816367.0,"EstimatedPower":2761899.1710119839,"Consumption":270116.242857143,"Temperature":-4.5,"Deviation":-1.9339748331100304,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":68,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-04-01T00:00:00Z","Power":2885174.8,"EstimatedPower":2951451.2435807148,"Consumption":283105.451152074,"Temperature":-9.9,"Deviation":2.2971378919819596,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":69,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-05-01T00:00:00Z","Power":3089902.2,"EstimatedPower":2900149.1745301066,"Consumption":283664.742857143,"Temperature":-4.7,"Deviation":-6.1410689784904378,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":70,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-06-01T00:00:00Z","Power":3227620.0,"EstimatedPower":2780273.3585052835,"Consumption":284044.431152074,"Temperature":6.6,"Deviation":-13.859953820298443,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":71,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-07-01T00:00:00Z","Power":2471207.0,"EstimatedPower":2790993.2908156421,"Consumption":295357.502857143,"Temperature":16.0,"Deviation":12.940489842236701,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false},{"Id":72,"CalculationMethod":"Потребление факт, кВт⋅ч","ProcessId":1,"Date":"2017-08-01T00:00:00Z","Power":2751209.6,"EstimatedPower":2848408.6166038075,"Consumption":293990.002857143,"Temperature":9.5,"Deviation":3.5329557080568286,"Excluded":[],"IsOutlier":false,"IsSelected":true,"IsNew":false,"IsModified":false,"IsDeleted":false}]
在json中,[{}]
表示一个数组,因此您可以将其反序列化为一个列表。
{}表示单个对象,您可以将其反序列化为类表示,例如。
一个注意事项
如果您想使用现有的json格式,则必须使用显示的列表列表here