I have a line like this (simple)
"{\"username":\"stack\",\"over":\"flow\"}"
I successfully converted this string to JSON using
JSONObject object = new JSONObject("{\"username":\"stack\",\"over":\"flow\"}");
I have a class
public class MyClass
{
public String username;
public String over;
}
How to convert a JSONObject to my custom MyClass object?
source
share