Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

JsonSerializer dont deserialize last deep of a class

$
0
0

Hi there I have following problem with JsonSerializer.Deserialize:

here the json string:

{"successful": true,"error": null,"content": {"pageIndex": 1,"totalPages": 32,"items": [
            {"toAddresses": [
                    {"id": 0,"name": "fidacrm@fidatek.cf","address": "fidacrm@fidatek.cf"
                    }
                ],"fromAddresses": [
                    {"id": 0,"name": "signodata gmail","address": "signodata@gmail.com"
                    }
                ],"bccAddresses": [],"ccAddresses": [],"replyTo": [],"attachments": [
                    {"id": 1,"fileName": "IMG_20170908_0001.pdf","fileNameUrl": null,"fileFullPath": null,"fileUrl": null,"contentType": {"id": 0,"format": null,"charset": null,"mediaSubtype": "pdf","mediaType": "application","mimeType": null,"name": "IMG_20170908_0001.pdf"
                        }
                    }
                ],"headers": [
                    {"id": 1,"rawField": "TUlNRS1WZXJzaW9u","headerId": 78,"field": "MIME-Version","offset": 3087,"rawValue": "IDEuMA0K","value": "1.0"
                    },
                    {"id": 32,"rawField": "RGVsaXZlcmVkLVRv","headerId": -1,"field": "Delivered-To","offset": 36,"rawValue": "IGZpZGFjcm1AZmlkYXRlay5jZg0K","value": "fidacrm@fidatek.cf"
                    },
                    {"id": 36,"rawField": "UmV0dXJuLVBhdGg=","headerId": 106,"field": "Return-Path","offset": 0,"rawValue": "IDxzaWdub2RhdGFAZ21haWwuY29tPg0K","value": "<signodata@gmail.com>"
                    },
                    {"id": 65,"rawField": "UmVjZWl2ZWQ=","headerId": 91,"field": "Received","offset": 70,"rawValue": "IGZyb20gc3Y3Ni5pZmFzdG5ldC5jb20NCglieSBzdjc2LmlmYXN0bmV0LmNvbSB3aXRoIExNVFANCglpZCBFQkNDSm4wUG4xN0QyaHNBSWNXSkVRDQoJKGVudmVsb3BlLWZyb20gPHNpZ25vZGF0YUBnbWFpbC5jb20+KQ0KCWZvciA8ZmlkYWNybUBmaWRhdGVrLmNmPjsgVHVlLCAyMSBBcHIgMjAyMCAxMToyMTozMyAtMDQwMA0K","value": "from sv76.ifastnet.com\tby sv76.ifastnet.com with LMTP\tid EBCCJn0Pn17D2hsAIcWJEQ\t(envelope-from <signodata@gmail.com>)\tfor <fidacrm@fidatek.cf>; Tue, 21 Apr 2020 11:21:33 -0400"
                    },
                    {"id": 79,"rawField": "RGVsaXZlcnktZGF0ZQ==","headerId": 47,"field": "Delivery-date","offset": 334,"rawValue": "IFR1ZSwgMjEgQXByIDIwMjAgMTE6MjE6MzMgLTA0MDANCg==","value": "Tue, 21 Apr 2020 11:21:33 -0400"
                    },
                    {"id": 94,"rawField": "UmVjZWl2ZWQ=","headerId": 91,"field": "Received","offset": 382,"rawValue": "IGZyb20gbWFpbC13bTEtZjUwLmdvb2dsZS5jb20gKFsyMDkuODUuMTI4LjUwXTozNjYyNSkNCglieSBzdjc2LmlmYXN0bmV0LmNvbSB3aXRoIGVzbXRwcyAgKFRMUzEuMikgdGxzIFRMU19FQ0RIRV9SU0FfV0lUSF9BRVNfMTI4X0dDTV9TSEEyNTYNCgkoRXhpbSA0LjkzKQ0KCShlbnZlbG9wZS1mcm9tIDxzaWdub2RhdGFAZ21haWwuY29tPikNCglpZCAxalF1aUwtMDA3ZjhHLTUwDQoJZm9yIGZpZGFjcm1AZmlkYXRlay5jZjsgVHVlLCAyMSBBcHIgMjAyMCAxMToyMTozMyAtMDQwMA0K","value": "from mail-wm1-f50.google.com ([209.85.128.50]:36625)\tby sv76.ifastnet.com with esmtps  (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\t(Exim 4.93)\t(envelope-from <signodata@gmail.com>)\tid 1jQuiL-007f8G-50\tfor fidacrm@fidatek.cf; Tue, 21 Apr 2020 11:21:33 -0400"
                    },
                    {"id": 114,"rawField": "UmV0dXJuLXBhdGg=","headerId": 106,"field": "Return-path","offset": 265,"rawValue": "IDxzaWdub2RhdGFAZ21haWwuY29tPg0K","value": "<signodata@gmail.com>"
                    },
                    {"id": 130,"rawField": "RW52ZWxvcGUtdG8=","headerId": -1,"field": "Envelope-to","offset": 301,"rawValue": "IGZpZGFjcm1AZmlkYXRlay5jZg0K","value": "fidacrm@fidatek.cf"
                    },
                    {"id": 269,"rawField": "VG8=","headerId": 116,"field": "To","offset": 2904,"rawValue": "IDxmaWRhY3JtQGZpZGF0ZWsuY2Y+DQo=","value": "<fidacrm@fidatek.cf>"
                    },
                    {"id": 285,"rawField": "UmVmZXJlbmNlcw==","headerId": 93,"field": "References","offset": 2930,"rawValue": "IA0K","value": ""
                    },
                    {"id": 304,"rawField": "UmVjZWl2ZWQ=","headerId": 91,"field": "Received","offset": 2536,"rawValue": "IGZyb20gcGllcmNhcmxvUEMgKG5ldC0yLTQ0LTEwNy0xMi5jdXN0LnZvZGFmb25lZHNsLml0LiBbMi40NC4xMDcuMTJdKQ0KICAgICAgICBieSBzbXRwLmdtYWlsLmNvbSB3aXRoIEVTTVRQU0EgaWQgdjE5c200MjQ2ODA4d3JhLjU3LjIwMjAuMDQuMjEuMDguMjEuMDMNCiAgICAgICAgZm9yIDxmaWRhY3JtQGZpZGF0ZWsuY2Y+DQogICAgICAgICh2ZXJzaW9uPVRMUzFfMiBjaXBoZXI9RUNESEUtRUNEU0EtQUVTMTI4LUdDTS1TSEEyNTYgYml0cz0xMjgvMTI4KTsNCiAgICAgICAgVHVlLCAyMSBBcHIgMjAyMCAwODoyMTowNCAtMDcwMCAoUERUKQ0K","value": "from piercarloPC (net-2-44-107-12.cust.vodafonedsl.it. [2.44.107.12])        by smtp.gmail.com with ESMTPSA id v19sm4246808wra.57.2020.04.21.08.21.03        for <fidacrm@fidatek.cf>        (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);        Tue, 21 Apr 2020 08:21:04 -0700 (PDT)"
                    },
                    {"id": 319,"rawField": "RnJvbQ==","headerId": 59,"field": "From","offset": 2857,"rawValue": "ICJzaWdub2RhdGEgZ21haWwiIDxzaWdub2RhdGFAZ21haWwuY29tPg0K","value": "\"signodata gmail\" <signodata@gmail.com>"
                    },
                    {"id": 320,"rawField": "WC1NYWlsZXI=","headerId": 126,"field": "X-Mailer","offset": 3193,"rawValue": "IE1pY3Jvc29mdCBPdXRsb29rIDE2LjANCg==","value": "Microsoft Outlook 16.0"
                    },
                    {"id": 334,"rawField": "SW4tUmVwbHktVG8=","headerId": 64,"field": "In-Reply-To","offset": 2944,"rawValue": "IA0K","value": ""
                    },
                    {"id": 348,"rawField": "TWVzc2FnZS1JRA==","headerId": 77,"field": "Message-ID","offset": 3030,"rawValue": "IDwwMDM5MDFkNjE3ZjAkNzhkNDdkZjAkNmE3ZDc5ZDAkQGdtYWlsLmNvbT4NCg==","value": "<003901d617f0$78d47df0$6a7d79d0$@gmail.com>"
                    },
                    {"id": 366,"rawField": "RGF0ZQ==","headerId": 44,"field": "Date","offset": 2991,"rawValue": "IFR1ZSwgMjEgQXByIDIwMjAgMTc6MjE6MDMgKzAyMDANCg==","value": "Tue, 21 Apr 2020 17:21:03 +0200"
                    },
                    {"id": 398,"rawField": "U3ViamVjdA==","headerId": 113,"field": "Subject","offset": 2959,"rawValue": "IEk6IEludmlvIGNvbiBhbGxlZ2F0bw0K","value": "I: Invio con allegato"
                    },
                    {"id": 409,"rawField": "REtJTS1TaWduYXR1cmU=","headerId": 52,"field": "DKIM-Signature","offset": 810,"rawValue": "IHY9MTsgYT1yc2Etc2hhMjU2OyBjPXJlbGF4ZWQvcmVsYXhlZDsNCiAgICAgICAgZD1nbWFpbC5jb207IHM9MjAxNjEwMjU7DQogICAgICAgIGg9ZnJvbTp0bzpyZWZlcmVuY2VzOmluLXJlcGx5LXRvOnN1YmplY3Q6ZGF0ZTptZXNzYWdlLWlkOm1pbWUtdmVyc2lvbg0KICAgICAgICAgOnRocmVhZC1pbmRleDpjb250ZW50LWxhbmd1YWdlOw0KICAgICAgICBiaD1Pa2EwL25KR0t0MkNKUTVtNW9oMENmSUFlZWdhSTkzVWtSMi9MWlYyU0hRPTsNCiAgICAgICAgYj1LRUpKbCtZVkk3TFRJSUJweFp5VXZXR1FIVzQwZlNvaklvQjNPZDh6bmFPRmtkYnJ4OTltcHB3Yzlha0d4VE1PbXMNCiAgICAgICAgIFBuNGJxNENjeTR5eGhPRWtneWVtRTV4VmZ5NEdBMEZBRUQ3Sy9aMnFrRUl0emNZSm1oclZ3T1JCeklnSUI1Z2l4aG4rDQogICAgICAgICBRcTVrK09SMnZnWnVYNXNYRzFGeEJEZEg0TEwxRms5L0t1VWVEZkNReWNLZnU5bzVaZWhWUTdVWXNXUCtjdXloZnZNMA0KICAgICAgICAgVEkyZXYySHdnTFF4TTM4K2xWWUJqSEw1R2JQNU5aZ1FOK0tyRFZYYlk0aGpoV0VjVG1sRXg0SE9VcFYzUzYzVytFaWMNCiAgICAgICAgIE1vTE1BY0xySzEzUGZIc1NjangvTDg2c1RaYlR3QTFQTXJGUHg2SVNacXZTTEJOUDgwWnBEUWx5ZFRDZ3d2Y05wVDNDDQogICAgICAgICAzRG13PT0NCg==","value": "v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20161025;        h=from:to:references:in-reply-to:subject:date:message-id:mime-version         :thread-index:content-language;        bh=Oka0/nJGKt2CJQ5m5oh0CfIAeegaI93UkR2/LZV2SHQ=;        b=KEJJl+YVI7LTIIBpxZyUvWGQHW40fSojIoB3Od8znaOFkdbrx99mppwc9akGxTMOms         Pn4bq4Ccy4yxhOEkgyemE5xVfy4GA0FAED7K/Z2qkEItzcYJmhrVwORBzIgIB5gixhn+         Qq5k+OR2vgZuX5sXG1FxBDdH4LL1Fk9/KuUeDfCQycKfu9o5ZehVQ7UYsWP+cuyhfvM0         TI2ev2HwgLQxM38+lVYBjHL5GbP5NZgQN+KrDVXbY4hjhWEcTmlEx4HOUpV3S63W+Eic         MoLMAcLrK13PfHsScjx/L86sTZbTwA1PMrFPx6ISZqvSLBNP80ZpDQlydTCgwvcNpT3C         3Dmw=="
                    },
                    {"id": 444,"rawField": "VGhyZWFkLUluZGV4","headerId": -1,"field": "Thread-Index","offset": 3227,"rawValue": "IEFkWVg2YTJVSTFMekI3eU1Rc0N4dXlnRmdZV0hJQUFBVFNZUUFBQ3RwTUFBQURwaWdBQUFlOWFBDQo=","value": "AdYX6a2UI1LzB7yMQsCxuygFgYWHIAAATSYQAACtpMAAADpigAAAe9aA"
                    },
                    {"id": 459,"rawField": "UmVjZWl2ZWQ=","headerId": 91,"field": "Received","offset": 667,"rawValue": "IGJ5IG1haWwtd20xLWY1MC5nb29nbGUuY29tIHdpdGggU01UUCBpZCB1MTI3c280MTUyNTgwd21nLjENCiAgICAgICAgZm9yIDxmaWRhY3JtQGZpZGF0ZWsuY2Y+OyBUdWUsIDIxIEFwciAyMDIwIDA4OjIxOjA3IC0wNzAwIChQRFQpDQo=","value": "by mail-wm1-f50.google.com with SMTP id u127so4152580wmg.1        for <fidacrm@fidatek.cf>; Tue, 21 Apr 2020 08:21:07 -0700 (PDT)"
                    },
                    {"id": 466,"rawField": "WC1Hb29nbGUtREtJTS1TaWduYXR1cmU=","headerId": -1,"field": "X-Google-DKIM-Signature","offset": 1489,"rawValue": "IHY9MTsgYT1yc2Etc2hhMjU2OyBjPXJlbGF4ZWQvcmVsYXhlZDsNCiAgICAgICAgZD0xZTEwMC5uZXQ7IHM9MjAxNjEwMjU7DQogICAgICAgIGg9eC1nbS1tZXNzYWdlLXN0YXRlOmZyb206dG86cmVmZXJlbmNlczppbi1yZXBseS10bzpzdWJqZWN0OmRhdGUNCiAgICAgICAgIDptZXNzYWdlLWlkOm1pbWUtdmVyc2lvbjp0aHJlYWQtaW5kZXg6Y29udGVudC1sYW5ndWFnZTsNCiAgICAgICAgYmg9T2thMC9uSkdLdDJDSlE1bTVvaDBDZklBZWVnYUk5M1VrUjIvTFpWMlNIUT07DQogICAgICAgIGI9cVlQQnFSeE5TK2szcnJuMjFjalJtOWJMSTlsRU9ka3AyTnRibFVIbkh3SGtYSTdyamtialJaTENxNVpoMjBaOTVmDQogICAgICAgICBjYWhiVGlxVjRkc0pGWjlWaW9MZE1QK0g2blN2M24xdVhRVHMvdkZTTk8zZXV3VTVqalVVdTF6MXhGNkJ1NUxkcEdLYw0KICAgICAgICAgdUhHb0R2L0tUajdaVW9DSEpPQ2gyMk9QbmpqMkRpc016MXZXT3lDTUYxb3lXQm1aM25oWEtLMVBic3hOVXRxOFJKTk4NCiAgICAgICAgIDRZMWU3ZTFZYWJkZi9MOUJjcGRBUmY2dnNvQU1DSGl6bU1BUEZiN0lBT3NKMk1DRERETGlnYUJRR3dwM2dES0hWN2RUDQogICAgICAgICBQZmExT0lWMi9BTVI4aThLSlVBRWpqakNoZVFtK2gyd05MKzVRVHBheGpILzd5eEV5YU9GZTFoK05aR1dEWWlBWEw5cQ0KICAgICAgICAgY0NXdz09DQo=","value": "v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20161025;        h=x-gm-message-state:from:to:references:in-reply-to:subject:date         :message-id:mime-version:thread-index:content-language;        bh=Oka0/nJGKt2CJQ5m5oh0CfIAeegaI93UkR2/LZV2SHQ=;        b=qYPBqRxNS+k3rrn21cjRm9bLI9lEOdkp2NtblUHnHwHkXI7rjkbjRZLCq5Zh20Z95f         cahbTiqV4dsJFZ9VioLdMP+H6nSv3n1uXQTs/vFSNO3euwU5jjUUu1z1xF6Bu5LdpGKc         uHGoDv/KTj7ZUoCHJOCh22OPnjj2DisMz1vWOyCMF1oyWBmZ3nhXKK1PbsxNUtq8RJNN         4Y1e7e1Yabdf/L9BcpdARf6vsoAMCHizmMAPFb7IAOsJ2MCDDDLigaBQGwp3gDKHV7dT         Pfa1OIV2/AMR8i8KJUAEjjjCheQm+h2wNL+5QTpaxjH/7yxEyaOFe1h+NZGWDYiAXL9q         cCWw=="
                    },
                    {"id": 469,"rawField": "WC1Hb29nbGUtU210cC1Tb3VyY2U=","headerId": -1,"field": "X-Google-Smtp-Source","offset": 2305,"rawValue": "IEFQaVF5cEpDVDg2am1MbFJKaVNhdE0rTGU0eGg2MTkwRHh1WWI4ZGtuUlZVL0lEMkJ1SUpVL3pWWVgzY3J5VHY2QUtMWllWY2trcE5EQT09DQo=","value": "APiQypJCT86jmLlRJiSatM+Le4xh6190DxuYb8dknRVU/ID2BuIJU/zVYX3cryTv6AKLZYVckkpNDA=="
                    },
                    {"id": 485,"rawField": "WC1SZWNlaXZlZA==","headerId": -1,"field": "X-Received","offset": 2409,"rawValue": "IGJ5IDIwMDI6YTFjOjllNTE6OiB3aXRoIFNNVFAgaWQgaDc4bXI1ODYzMDIwd21lLjE3Ny4xNTg3NDgyNDY1ODc4Ow0KICAgICAgICBUdWUsIDIxIEFwciAyMDIwIDA4OjIxOjA1IC0wNzAwIChQRFQpDQo=","value": "by 2002:a1c:9e51:: with SMTP id h78mr5863020wme.177.1587482465878;        Tue, 21 Apr 2020 08:21:05 -0700 (PDT)"
                    },
                    {"id": 501,"rawField": "WC1HbS1NZXNzYWdlLVN0YXRl","headerId": -1,"field": "X-Gm-Message-State","offset": 2196,"rawValue": "IEFHaTBQdVozUGN5akx5d0Rjb2NVeXo3V09oZG5weDFFeVh4eGg1TnQ3SitITGJvdHJZRXM1TGZjDQoJYUo1VUNJbmZzdHl2dGZaZE81eGIwcC9EWXFyMg0K","value": "AGi0PuZ3PcyjLywDcocUyz7WOhdnpx1EyXxxh5Nt7J+HLbotrYEs5Lfc\taJ5UCInfstyvtfZdO5xb0p/DYqr2"
                    }
                ],"references": [],"messageFlags": [
                    {"id": 5,"messageFlag": 5
                    }
                ],"id": 15,"messageId": "003901d617f0$78d47df0$6a7d79d0$@gmail.com","uid": {"id": 15,"uidId": 32,"validity": 1567921962,"isValid": true
                },"date": "2020-04-21T17:21:03+02:00","importance": 1,"priority": 1,"subject": "I: Invio con allegato","body": "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\r\n<html xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" xmlns:m=\"http://schemas.microsoft.com/office/2004/12/omml\" xmlns=\"http://www.w3.org/TR/REC-html40\"><head><meta name=Generator content=\"Microsoft Word 15 (filtered medium)\"><style><!--\r\n/* Font Definitions */\r\n@font-face\r\n\t{font-family:\"Cambria Math\";\r\n\tpanose-1:2 4 5 3 5 4 6 3 2 4;}\r\n@font-face\r\n\t{font-family:Calibri;\r\n\tpanose-1:2 15 5 2 2 2 4 3 2 4;}\r\n/* Style Definitions */\r\np.MsoNormal, li.MsoNormal, div.MsoNormal\r\n\t{margin:0cm;\r\n\tmargin-bottom:.0001pt;\r\n\tfont-size:11.0pt;\r\n\tfont-family:\"Calibri\",sans-serif;\r\n\tmso-fareast-language:EN-US;}\r\na:link, span.MsoHyperlink\r\n\t{mso-style-priority:99;\r\n\tcolor:blue;\r\n\ttext-decoration:underline;}\r\nspan.StileMessaggioDiPostaElettronica20\r\n\t{mso-style-type:personal-reply;\r\n\tfont-family:\"Calibri\",sans-serif;\r\n\tcolor:windowtext;}\r\n.MsoChpDefault\r\n\t{mso-style-type:export-only;\r\n\tfont-size:10.0pt;}\r\n@page WordSection1\r\n\t{size:612.0pt 792.0pt;\r\n\tmargin:70.85pt 2.0cm 2.0cm 2.0cm;}\r\ndiv.WordSection1\r\n\t{page:WordSection1;}\r\n--></style><!--[if gte mso 9]><xml>\r\n<o:shapedefaults v:ext=\"edit\" spidmax=\"1026\" />\r\n</xml><![endif]--><!--[if gte mso 9]><xml>\r\n<o:shapelayout v:ext=\"edit\">\r\n<o:idmap v:ext=\"edit\" data=\"1\" />\r\n</o:shapelayout></xml><![endif]--></head><body lang=IT link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='mso-fareast-language:IT'>Da:</span></b><span style='mso-fareast-language:IT'> signodata gmail &lt;signodata@gmail.com&gt; <br><b>Inviato:</b> martedì 21 aprile 2020 17:07<br><b>A:</b> 'fidacrm@fidatek.cf' &lt;fidacrm@fidatek.cf&gt;<br><b>Oggetto:</b> I: Invio con allegato<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='mso-fareast-language:IT'>Da:</span></b><span style='mso-fareast-language:IT'> signodata gmail &lt;<a href=\"mailto:signodata@gmail.com\">signodata@gmail.com</a>&gt; <br><b>Inviato:</b> martedì 21 aprile 2020 17:01<br><b>A:</b> 'fidacrm@fidatek.cf' &lt;<a href=\"mailto:fidacrm@fidatek.cf\">fidacrm@fidatek.cf</a>&gt;<br><b>Oggetto:</b> I: Invio con allegato<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='mso-fareast-language:IT'>Da:</span></b><span style='mso-fareast-language:IT'> signodata gmail &lt;<a href=\"mailto:signodata@gmail.com\">signodata@gmail.com</a>&gt; <br><b>Inviato:</b> martedì 21 aprile 2020 16:41<br><b>A:</b> 'fidacrm@fidatek.cf' &lt;<a href=\"mailto:fidacrm@fidatek.cf\">fidacrm@fidatek.cf</a>&gt;<br><b>Oggetto:</b> I: Invio con allegato<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='mso-fareast-language:IT'>Da:</span></b><span style='mso-fareast-language:IT'> signodata gmail &lt;<a href=\"mailto:signodata@gmail.com\">signodata@gmail.com</a>&gt; <br><b>Inviato:</b> martedì 21 aprile 2020 16:33<br><b>A:</b> 'fidacrm@fidatek.cf' &lt;<a href=\"mailto:fidacrm@fidatek.cf\">fidacrm@fidatek.cf</a>&gt;<br><b>Oggetto:</b> Invio con allegato<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Invio con allegato in pdf.<o:p></o:p></p></div></body></html>","isHtml": true,"needReadReceipt": false,"needDeliveredReceipt": false,"inReplyTo": null,"sender": null,"messageDirection": 1
            }
        ],"hasPreviousPage": false,"hasNextPage": true
    }
}

here the code to deserialize:

            var res = await http.GetFromJsonAsync<ApiResult>("api/Email/GetUserInBoxEmails/1/Date/Desc/10/" + auth.CurrentUserId);
            if (res.Successful)
            {
                PaginatedMessages = JsonSerializer.Deserialize<PaginatedList<EmailMessageDto>>(res.Content.ToString(), options);
}

here the calss that dont deserialize:

namespace FidaBlazorUI_Share.Models.Email.ModelDto
{
    public class EmailAttachmentDto
    {
        public EmailAttachmentDto()
        {

        }
        public EmailAttachmentDto(EmailAttachment attachment)
        {
            Id = attachment.Id;
            FileName = attachment.FileName;
            FileNameUrl = attachment.FileNameUrl;
            FileFullPath = attachment.FileFullPath;
            FileUrl = attachment.FileUrl;
            ContentType = new EmailContentTypeDto(attachment.ContentType);
        }

        public int Id { get; set; }
        public string FileName { get; internal set; }
        public string FileNameUrl { get; internal set; }
        public string FileFullPath { get; internal set; }
        public string FileUrl { get; internal set; }
        public EmailContentTypeDto ContentType { get; }
    }
}

and the ContentType clas that don´t want to deserialize:

namespace FidaBlazorUI_Share.Models.Email.ModelDto
{
    public class EmailContentTypeDto
    {
        public EmailContentTypeDto()
        {

        }
        public EmailContentTypeDto(EmailContentType contentType)
        {
            Format = contentType.Format;
            Charset = contentType.Charset;
            MediaSubtype = contentType.MediaSubtype;
            MediaType = contentType.MediaType;
            MimeType = contentType.MimeType;
            Name = contentType.Name;
        }

        public int Id { get; set; }
        public string Format { get; set; }
        public string Charset { get; set; }
        public string MediaSubtype { get; set; }
        public string MediaType { get; set; }
        public string MimeType { get; }
        public string Name { get; set; }
    }
}

So the problem that on deserialization I get all deserialized except the Attachment Content Type that is sull when in the Json there is.

Thank You for help


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>