I am returning a perfect JSON Object from PHP MySQL(I tested on an online JSON converter, works fine, and it looks exactly like the example/stackoverflow examples).
I have tried using the JsonUtility.FromJson and FromJsonOverwrite methods and neither of them work…the object is always null when I check the properties.
I am at my wits end…this is simple stuff, it should not require 3+ hours and counting to deserialize a JSON object into a class.
www.text is returning:
{“id":“1”,“username”:“JimSmith”,“password”:“smith11”,“email”:"jimsmith@yahoo.com”,“isTrial”:“0”}
Test test = new test();
JsonUtility.FromJsonOverwrite(www.test, user); //Returing all NULL’s
Test test1 = JsonUtility.FromJson(www.text); //Returning all NULL’s
Here is the class object
[Serializable]
public class Test
{
public string id { get; set; }
public string username { get; set; }
public string password { get; set; }
public string email { get; set; }
public string isTrial { get; set; }
}
What is wrong? This is driving me crazy