0
VB.net을 사용하여 JSON 문자열을 deserialize하려는 중이므로 완성 된 List에서 값을 가져올 수 없습니다. 여기에 간단한 클래스입니다 : 나는 이름/값 쌍을 얻을 수없는 것 때문에 지금 분실하고JSON 역 직렬화 및 VB.NET 문제
Dim JSONstring As String = "[{""Name"":""John"",""Picture"":""mypic.jpg""}]"
Dim json As New JavaScriptSerializer()
Dim outputinfo = json.Deserialize(Of List(Of Personinformation))(JSONstring)
:
Public Class Personinformation
Private theName As String
Private thePic As String
Public Property Name() As String
Get
Name = theName
End Get
Set(ByVal value As String)
theName = value
End Set
End Property
Public Property Picture() As String
Get
Picture = thePic
End Get
Set(ByVal value As String)
thePic = value
End Set
End Property
End Class
그때를 Page_Load에서 나는 다음 삽입했습니다. 나는이 일을 시도했다
나는 "인덱스가 범위를 벗어났습니다. 콜렉션의 크기보다 작아야합니다."라고 들었습니다.
내가 뭘 잘못하고 있니?
감사합니다. 이제 이해가된다. –