【发布时间】:2017-04-12 09:49:14
【问题描述】:
所以我有一个生成这个文件的机器人:
"223800261297176576" : {
"129592273850597376" : {
"balance" : 750,
"created_at" : "2016-10-08 18:00:53",
"name" : "Nathiri"
},
"180444644650385409" : {
"balance" : 950,
"created_at" : "2016-11-01 14:55:11",
"name" : "WAC"
},
"180456532083867650" : {
"balance" : 1150,
"created_at" : "2016-10-08 18:12:24",
"name" : "WiNDOGE_Master"
},
"194634355820199936" : {
"balance" : 0,
"created_at" : "2016-10-16 15:07:55",
"name" : "DogeBot"
},
"195889991073660929" : {
"balance" : 750,
"created_at" : "2016-10-24 18:47:25",
"name" : "Mikey"
},
"218499966652383232" : {
"balance" : 1250,
"created_at" : "2016-10-02 17:29:18",
"name" : "[CDHG]PhoenixDeFalco"
},
"223084038846545920" : {
"balance" : 300,
"created_at" : "2016-10-11 19:24:36",
"name" : "spyty06"
},
"228987707571830784" : {
"balance" : 700,
"created_at" : "2016-10-11 16:06:13",
"name" : "[CDHG]CarrieDeFalco"
},
"229026428706881537" : {
"balance" : 500,
"created_at" : "2016-10-02 17:40:16",
"name" : "[CDHG] commander spyty06"
},
"229347464065449984" : {
"balance" : 750,
"created_at" : "2016-10-29 20:24:44",
"name" : "FaZe King"
},
"238783223965024273" : {
"balance" : 750,
"created_at" : "2016-10-25 18:40:11",
"name" : "[CDHG]JacenDeFalco"
},
"242017771200708609" : {
"balance" : 1845,
"created_at" : "2016-10-29 20:21:27",
"name" : "StarRoseDeFalco"
}
}
我的问题是,如何让 Visual Studio 2015 中的 C# Windows 窗体应用程序读取此文件并使用其中的信息自动更改表单中的各个字段? This 是表单的样子。
如果有人可以帮助我让程序读取 .json 并将其用作数据以放入表单上的框中,我将非常感激......非常感谢!
【问题讨论】:
-
你试过什么? SO 不是代码编写服务。请阅读stackoverflow.com/help/how-to-ask
-
@itsme86 我试图让它通过
using bank.json读取文件,我试过import bank.json,我还尝试将bank.json中的代码直接复制到form1 中。 cs 代码文件...没有任何效果...我被正式难住了。
标签: c# json visual-studio-2015 discord