1
部分看起來是這樣的。反序列化JSON無效的屬性名稱
"interests": {
"5e0344ae18": true,
"545e5bdb01": true,
"33aa542ea0": true,
"f51a5f9716": true,
"31109a4d58": true,
"bf5f946fd4": true,
"563320981e": false
}
所以用於反序列化的屬性應該是我相信的。
public Interests interests { get; set; }
public class Interests
{
public bool 5e0344ae18 { get; set; }
public bool 545e5bdb01 { get; set; }
public bool 33aa542ea0 { get; set; }
public bool f51a5f9716 { get; set; }
public bool 31109a4d58 { get; set; }
public bool bf5f946fd4 { get; set; }
public bool 563320981e { get; set; }
}
但是由數字和字母的屬性名稱不符合每個喜歡「無效令牌'類,結構或接口成員聲明」 5e0344編譯錯誤有效。 如何屬性名在JSON數據匹配的名字嗎?