Deserialize JSON to POJO using GSON

  • Replies:1
Rui Sousa
  • Forum posts: 1

Oct 3, 2015, 10:54:00 PM via Website

Hi, i'm new to JSON and i need to deserialize the following JSON string in to POJO using GSON using Android studio.

Here is my JSON:

{

"Status": "true",

"Result": "{\"rows\":{\"row\":{\"status\":true,\"subareas\":[{\"nome\":\"Associacao Utente\",\"id\":9,\"grafs\":\"{

\"rows\": {

\"row\": {

\"id\": 6,

\"nome\": \"Associacao Utente\",

\"tipo\": \"PIE\",

\"serv\": \"MV_AS_UTENTE_POR_NEGOCIO\",

\"periodo\": \"ANO\"

}

}

}\"},{\"nome\":\"Chaves\",\"id\":60,\"grafs\":\"{

\"rows\": [{

\"id\": 35,

\"nome\": \"Chaves Criados por ano\",

\"tipo\": \"LINHA\",

\"serv\": \"MV_ASSOC_TOTAL_CHAVES\",

\"periodo\": \"ANO\"

},

{

\"id\": 592,

\"nome\": \"Chaves Associado Ao User Portal\",

\"tipo\": \"BAR\",

\"serv\": \"MV_ASSOC_USER_CHAVES\",

\"periodo\": \"TODOS\"

},

{

\"id\": 593,

\"nome\": \"Chaves Associado Ao Negocios\",

\"tipo\": \"BAR\",

\"serv\": \"MV_ASSOC_CHAVES\",

\"periodo\": \"TODOS\"

}]

}\"}]}}}"

}

I i want to produce the following output.

image

Reply