Json 生成类VB.NET

Json 生成类VB.NET,json,vb.net,Json,Vb.net,我正在使用生成一个类,遇到了一个问题。我正在使用的JSON字符串: { "type": "champion", "version": "7.16.1", "data": { "1": { "title": "the Dark Child", "id": 1, "key": "Annie", "name": "Annie" } } } 它生成的类: Public Class 1 Public Property

我正在使用生成一个类,遇到了一个问题。我正在使用的JSON字符串:

{
  "type": "champion",
  "version": "7.16.1",
  "data": {
    "1": {
      "title": "the Dark Child",
      "id": 1,
      "key": "Annie",
      "name": "Annie"
    }
  }
}
它生成的类:

Public Class 1
    Public Property title As String
    Public Property id As Integer
    Public Property key As String
    Public Property name As String
End Class

Public Class Data
    Public Property 1 As 1
End Class

Public Class Example
    Public Property type As String
    Public Property version As String
    Public Property data As Data
End Class

问题是,我无法命名一个类1,我仍在试图找到一个解决方案,但没有运气。有什么办法解决这个问题吗?

我想应该改成
字典

Public Class Example
    Public Property type As String
    Public Property version As String
    Public Property data As Dictionary(Of String, NumberType)
End Class

Public Class NumberType
    Public Property title As String
    Public Property id As Integer
    Public Property key As String
    Public Property name As String
End Class

如果我在
数据中有另一个块:
“1”:
“2”:
它将如何工作?是的,我将创建一个字典,其中有两个键“1”和“2”!您不仅给了我一个简单的答案,还为我节省了近1k行代码!(我的模型有128块内部数据)谢谢!从现在起,我会记住字典的。你不能命名一个以数字开头的对象。@Karuntos这是我的问题,但现在问题解决了。