0
我有一个JSON这样,不得不反序列化:C#反序列化JSON根密钥未知
{
"0": {
"foo_id":"xyz",
"bar_id":"abc",
"book": {
"0": {
"title":"hello",
"author":"person_x"
},
"1": {
"title":"hi",
"author":"person_y"
}
},
"1": {
"foo_id":"xyz",
"bar_id":"abc",
"book": {
"0": {
"title":"hello",
"author":"person_a"
},
"1": {
"title":"bye",
"author":"person_b"
}
},
"random":"string",
"other":"thing"
}
类似this问题,但给出的答案是不行的,因为我不拥有的奢侈品创造这样的
public class RootObject
{
public Dictionary<string, Object> Objects {get; set;}
}
一类的。如果我不是对象领域做的是反序列化后空。
根对象和书籍对象都是动态的。
任何其他方法,将不胜感激,在此先感谢。
我仍然有一个RootObject类,这是一个我想反序列化,因为它有一些其他的数据,我需要。谢谢 – qwerty123
@ querty123重要的是要知道完整的JSON响应的整个结构,以反序列化 – Jim
任何想法如何设置这个JSON,谢谢 – qwerty123