Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using Newtonsoft.Json;
- namespace Test
- {
- class EmailData
- {
- public int Type { get; set; }
- }
- class ApiData
- {
- [JsonProperty("request.id")]
- public int? RequestId { get; set; }
- [JsonProperty("list")]
- public Dictionary<string, EmailData> EmailDictionary { get; set; }
- }
- class Program
- {
- static void Main(string[] args)
- {
- var data = JsonConvert.DeserializeObject<ApiData>(@"
- {
- ""request.id"": null,
- ""list"": {
- ""email1@email.com"": {
- ""Type"": ""1""
- },
- ""email2@email.com"": {
- ""Type"": ""1""
- },
- ""email3@email.com"": {
- ""Type"": ""1""
- }
- }
- }"
- );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement