【发布时间】:2017-08-21 13:05:50
【问题描述】:
我正在使用JSON Utils 生成一个类,但遇到了问题。我正在使用的 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 类,我仍在努力寻找解决方案,但还没有运气。有解决办法吗?
【问题讨论】:
-
您不能命名以数字开头的对象。
-
@Karuntos 那是我的问题,但现在已经解决了。