I have this JSON response
{
"multicast_id": 6847210640445644406,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [{
"message_id": "0:1540898546437583%dadf2158f9fd7ecd"
}]
}
Now how can I get the value of message_id??
I have designed the class this way for de-serialisation
public class SingleResponse
{
public string Multicast_id { get; set; }
public byte Success { get; set; }
public byte Failure { get; set; }
public ICollection<Result> Results { get; set; }
}
public class Result
{
public string Message_id { get; set; }
}
Is my procedure right? If yes, how can I get the value of MessageId?
So far I have tried for deserialization and it works fine
SingleResponse singleResponse = JsonConvert.DeserializeObject<SingleResponse>(response);
and able to get other properties like this way
byte success = singleResponse.success