6
나는이 하나의 JSON을 구문 분석 이것의 완벽하게 작동하지만 지금은 모든 전례 json 개체의 배열을 구문 분석하고 싶습니다.C#에서 클래스에서 JSON 배열을 구문 분석
예를 들어이 JSON 배열 :
[
{
"text": "Sample Text",
"id": 123456789,
"user": {
"name": "ExampleUser",
"id": 123,
"screen_name": "ExampleUser"
},
"in_reply_to_screen_name": null,
},
{
"text": "Another Sample Text",
"id": 101112131415,
"user": {
"name": "ExampleUser2",
"id": 124,
"screen_name": "ExampleUser2"
},
"in_reply_to_screen_name": null,
}
]
나는 다른 클래스를 만들 : 다음
public class ListRoot {
public List<RootObject> status { get; set; }
}
과 같은 방법을 사용 :
ListRoot h = JsonConvert.DeserializeObject<ListRootObject>(string);
을하지만 그것은 작동하지 않습니다. 이 Json 배열을 어떻게 C# 클래스로 파싱 할 수 있습니까?
네, 고맙습니다. – user2505650