I have the following string:
{\"account\":{
\"username\":\"ikevin2222\",
\"birthdate\":\"2017-01-31T09:37:44.000Z\",
\"gender\":true,
\"email
Generate your POJO by using http://www.jsonschema2pojo.org/ or by adding plugin in studio (https://github.com/Hexara/Json2Pojo)
now add dependencies compile 'com.google.code.gson:gson:2.6.2'
:
convert your json or string to POJO
Gson gson = new Gson();
POJOClass pojo = gson.fromJson(jsonObject.toString(), new TypeToken() {}.getType());