gpt4 book ai didi

c# - 读取 Json 文件时不支持给定路径的格式

转载 作者:行者123 更新时间:2023-11-30 23:06:17 25 4
gpt4 key购买 nike

<分区>

我正在尝试读取 Json 文件并将其反序列化。但是每当我尝试读取文件时,它都会说“不支持给定路径的格式”。这是我的 json 文件。在发布之前,我浏览了这篇文章,但我想它与我的问题无关 The given path's format is not supported

在这里编辑我的帖子是项目的结构。主要解决方案 -> ViewModels(文件夹) -> DGXRun.json

{
"type": "DGX parameter file",
"version": "v1.0",
"date": "01/10/2018",

"assays": [
{
"assay_1": {
"display_name": "W3 single cell V1.0",
"volumes": [
{
"volume_1": {
"volume_display_value": 20,
"global_parameters": {
"param1": 5
},
"run": {
"Initialize coarse reservoirs": {
"Max time": 30.0,
"Min time": 5.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 0,
"Vacuum Reservoir Pressure": -5.0,
"Pressure Reservoir Pressure": 5.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": -1.75,
"V13:Channel 1OutletValve": "Closed",
"V14:Channel 2OutletValve": "Closed",
"V15:Channel 3 Outlet Valve": "Closed",
"V16:Channel 4 Outlet Valve": "Closed",
"V17:Channel 1 Small Large Valve": "Small",
"V18:Channel 2 Small Large Valve": "Small",
"V19:Channel 3 Small Large Valve": "Small"
},
"Create droplets": {
"Max time": 180.0,
"Min time": 180.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 2,
"Vacuum Reservoir Pressure": -5.0,
"Pressure Reservoir Pressure": 5.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": -1.75,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Open",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
},
"Initialize Pushback": {
"Max time": 5.0,
"Min time": 1.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 0,
"Vacuum Reservoir Pressure": -5.0,
"Pressure Reservoir Pressure": 5.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": 2.0,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Closed",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
},
"Pushback": {
"Max time": 25.0,
"Min time": 25.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 0,
"Vacuum Reservoir Pressure": -5.0,
"Pressure Reservoir Pressure": 5.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": 2.0,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Open",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
},
"End": {
"Max time": 5.0,
"Min time": 1.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 0,
"Vacuum Reservoir Pressure": 0.0,
"Pressure Reservoir Pressure": 0.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": 0.0,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Closed",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
}
}
},
"volume_2": {
"volume_display_value": 50,
"global_parameters": {
"param1": 5
},
"run": {
"Step 1": {
"Max time": 30.0,
"Min time": 5.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 0,
"Vacuum Reservoir Pressure": -5.0,
"Pressure Reservoir Pressure": 5.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": -1.75,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Closed",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
},
"Step 2": {
"Max time": 180.0,
"Min time": 180.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 2,
"Vacuum Reservoir Pressure": -5.0,
"Pressure Reservoir Pressure": 5.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": -1.75,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Open",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
},
"Step 3": {
"Max time": 5.0,
"Min time": 1.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 0,
"Vacuum Reservoir Pressure": -5.0,
"Pressure Reservoir Pressure": 5.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": 2.0,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Closed",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
},
"Step 4": {
"Max time": 25.0,
"Min time": 25.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 0,
"Vacuum Reservoir Pressure": -5.0,
"Pressure Reservoir Pressure": 5.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": 2.0,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Open",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
},
"Step 5": {
"Max time": 5.0,
"Min time": 1.0,
"Set temperature": 22.0,
"Air flow min": 0,
"Air flow max": 0,
"Vacuum Reservoir Pressure": 0.0,
"Pressure Reservoir Pressure": 0.0,
"Channel 1 Pressure": 0.0,
"Channel 2 Pressure": 0.0,
"Channel 3 Pressure": 0.0,
"Channel 4 Pressure": 0.0,
"V13: Channel 1 Outlet Valve": "Closed",
"V14: Channel 2 Outlet Valve": "Closed",
"V15: Channel 3 Outlet Valve": "Closed",
"V16: Channel 4 Outlet Valve": "Closed",
"V17: Channel 1 Small Large Valve": "Small",
"V18: Channel 2 Small Large Valve": "Small",
"V19: Channel 3 Small Large Valve": "Small"
}
}
}

}
]
},

"assay_2": {
"display_name": "W3 single cell V2.0",
"volumes": [
{
"volume_1": {
"volume display value": 100,
"global parameters": {
"param1": 0
},
"run": {
}
}

}
]
}
}
]
}

这就是我尝试阅读它的方式,

string json = File.ReadAllText("pack://application:,,,/BioRad.NextGenDG.ViewModels;component/DGXRun.json"); //I get an exception here.
var data = JsonConvert.DeserializeObject<ReadJsonAssays>(json);

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com