using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
public static void Main()
""name"": ""xxxxx xxxxxx xxxxxxx"",
""cdate"": ""2019-10-27 22:43:23"",
""name"": ""yyyyy yyyyy yyyyy"",
""cdate"": ""2019-10-27 22:44:03"",
""result_message"": ""Success: Something is returned"",
""result_output"": ""json""
var result = JsonConvert.DeserializeObject<BasicListResponse>(json);
Console.WriteLine($"Result Code: {result.ResultCode}");
Console.WriteLine($"Result Message: {result.ResultMessage}");
Console.WriteLine($"Result Output: {result.ResultOutput}");
foreach (var item in result.List)
Console.WriteLine($"Id: {item.Id}");
Console.WriteLine($"Name: {item.Name}");
Console.WriteLine($"Created On: {item.CreatedOn}");
Console.WriteLine($"Private: {item.Private}");
Console.WriteLine($"User Id: {item.UserId}");
Console.WriteLine($"Subscriber Count: {item.SubscriberCount}");
[JsonProperty("result_code")]
public int ResultCode { get; set; }
[JsonProperty("result_message")]
public string ResultMessage { get; set; }
[JsonProperty("result_output")]
public string ResultOutput { get; set; }
public class BasicListResponse : Result
public List<BasicList> List { get; set; }
private Dictionary<string, JToken> Data { get; set; }
private void OnDeserialized(StreamingContext context)
List = Data?.OrderBy(kvp => kvp.Key)
.Select(kvp => kvp.Value.ToObject<BasicList>())
public string Id { get; set; }
public string Name { get; set; }
public DateTime CreatedOn { get; set; }
[JsonProperty("private")]
private string PrivateAsString { get; set; }
get { return PrivateAsString != "0"; }
set { PrivateAsString = value ? "1" : "0"; }
public string UserId { get; set; }
[JsonProperty("subscriber_count")]
public int SubscriberCount { get; set; }