gpt4 book ai didi

c# - 如何使用 C# 将 JSON 文本转换为对象

转载 作者:可可西里 更新时间:2023-11-01 03:11:31 24 4
gpt4 key购买 nike

如何将以下 JSON 响应转换为 C# 对象?

{ 
"err_code": "0",
"org": "CGK",
"des": "SIN",
"flight_date": "20120719",
"schedule": [
["W2-888","20120719","20120719","1200","1600","03h00m","737-200","0",[["K","9"],["F","9"],["L","9"],["M","9"],["N","9"],["P","9"],["C","9"],["O","9"]]],
["W2-999","20120719","20120719","1800","2000","01h00m","MD-83","0",[["K","9"],["L","9"],["M","9"],["N","9"]]]
]
}

最佳答案

要从 json 字符串创建类,请复制该字符串。

在 Visual Studio 中,单击“编辑”>“选择性粘贴”>“将 Json 粘贴为类”。

关于c# - 如何使用 C# 将 JSON 文本转换为对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11260631/

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