I have the following JSON string, which I'm supposed to parse to POJO:
{
"Status": "true",
"Result": {
    "rows": {
        "row": {
            "status": true,
            "subareas": [
                {
                    "nome": "Associacao Utente",
                    "id": 9,
                    "grafs": {
                        "rows": [
                            {
                                "id": 6,
                                "nome": "AssociacaoUtente",
                                "tipo": "PIE",
                                "serv": "MV_AS_UTENTE_POR_NEGOCIO",
                                "periodo": "ANO"
                            }
                        ]
                    }
                },
                {
                    "nome": "Chaves",
                    "id": 60,
                    "grafs": {
                        "rows": [
                            {
                                "id": 35,
                                "nome": "ChavesCriadosporano",
                                "tipo": "LINHA",
                                "serv": "MV_ASSOC_TOTAL_CHAVES",
                                "periodo": "ANO"
                            },
                            {
                                "id": 592,
                                "nome": "ChavesAssociadoAoUserPortal",
                                "tipo": "BAR",
                                "serv": "MV_ASSOC_USER_CHAVES",
                                "periodo": "TODOS"
                            },
                            {
                                "id": 593,
                                "nome": "ChavesAssociadoAoNegocios",
                                "tipo": "BAR",
                                "serv": "MV_ASSOC_CHAVES",
                                "periodo": "TODOS"
                            }
                        ]
                    }
                }
            ]
        }
    }
}
}
and I have these classes to deserialize to POJO, which is working, thanks to Saurabh:
public class Example {
private String Status;
private Result Result;
public String getStatus() {
    return Status;
}
public void setStatus(String status) {
    Status = status;
}
public Result getResult() {
    return Result;
}
public void setResult(Result result) {
    Result = result;
}
@Override
public String toString() {
    return "Example [Status=" + Status + ", Result=" + Result + "]";
}
}
public class Result {
private Rows rows;
public Rows getRows() {
    return rows;
}
public void setRows(Rows rows) {
    this.rows = rows;
}
@Override
public String toString() {
    return "Result [rows=" + rows + "]";
}
}
public class Rows {
private Row row;
public Row getRow() {
    return row;
}
public void setRow(Row row) {
    this.row = row;
}
@Override
public String toString() {
    return "Rows [row=" + row + "]";
}
}
import java.util.ArrayList;
import java.util.List;
public class Row {
private Boolean status;
private List<Subarea> subareas = new ArrayList<Subarea>();
public Boolean getStatus() {
    return status;
}
public void setStatus(Boolean status) {
    this.status = status;
}
public List<Subarea> getSubareas() {
    return subareas;
}
public void setSubareas(List<Subarea> subareas) {
    this.subareas = subareas;
}
@Override
public String toString() {
    return "Row [status=" + status + ", subareas=" + subareas + "]";
}
}
public class Subarea {
private String nome;
private Integer id;
private Grafs grafs;
public String getNome() {
    return nome;
}
public void setNome(String nome) {
    this.nome = nome;
}
public Integer getId() {
    return id;
}
public void setId(Integer id) {
    this.id = id;
}
public Grafs getGrafs() {
    return grafs;
}
public void setGrafs(Grafs grafs) {
    this.grafs = grafs;
}
@Override
public String toString() {
    return "Subarea [nome=" + nome + ", id=" + id + ", grafs=" + grafs
            + "]";
}
}
import java.util.ArrayList;
import java.util.List;
public class Grafs {
private List<Row_> rows = new ArrayList<Row_>();
public List<Row_> getRows() {
    return rows;
}
public void setRows(List<Row_> rows) {
    this.rows = rows;
}
@Override
public String toString() {
    return "Grafs [rows=" + rows + "]";
}
}
public class Row_ {
private Integer id;
private String nome;
private String serv;
private String periodo;
public Integer getId() {
    return id;
}
public void setId(Integer id) {
    this.id = id;
}
public String getNome() {
    return nome;
}
public void setNome(String nome) {
    this.nome = nome;
}
public String getServ() {
    return serv;
}
public void setServ(String serv) {
    this.serv = serv;
}
public String getPeriodo() {
    return periodo;
}
public void setPeriodo(String periodo) {
    this.periodo = periodo;
}
@Override
public String toString() {
    return "Row_ [id=" + id + ", nome=" + nome + ", serv=" + serv
            + ", periodo=" + periodo + "]";
}
}
I need help populating the data received from JSON to a recyclerview, divided by sub areas. I'm confused on how to create the adapter.
 
     
    