I tried to deserialize:
JsonConvert.DeserializeObject<ContentModel>("{\"Message\":\"asdf\",\"Attachments\":[\"dummy.pdf\",\"unnamed.jpg\"]}"),
Where the content model:
public class ContentModel
{
public string Message { get; set; }
public string ContentType { get; set; }
public string[] Attachments { get; set; }
}
But the deserialization failed due to the array of string in the Attachments.
The character you are using in between of \"dummy.pdf\" and \"unnamed.jpg\" is not really a comma! it just looks like to be a comma!
remove it and replace it with , .
Update
As @dbc mentioned, The character being used currently in your code is FULLWIDTH COMMA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With