i have a method that sends a POST
Request to my PHP API and the API responds with a JSON String return value.
however after using JsonConvert.DeserializeObject()
to the JSON result, i am getting this format
{[
{
"usr_name": "12-34567",
"usr_fullname": "LASTNAME, FIRSTNAME MIDDLENAME",
"usr_emailaddress": "myemail@mail.com",
"photo_url": "http://mywebsite.com/fetch_photo.php?id=MTItNDA1MDY=",
"token": "64c420939814c62889ea143d17736841"
}
]}
however i am not able to Deserialize
it to my Class that is structured like below
public class MyObject
{
public string usr_name { get; set; }
public string usr_fullname { get; set; }
public string usr_emailaddress { get; set; }
public string photo_url { get; set; }
public string token { get; set; }
}
i am using Newtonsoft JSON.Net for this purpose, this is my first time dealing with JSON inside C# so i am quite clueless no how or what to do. i've done several research only to find outdated tutorials or questions unlike my returned JSON value