Here is the valid json for your invalid json:
{
"ModuleEId": [
[
"Test_SFPCA",
"SFPCA_0001",
"SFPCA_0002"
],
[
"Android_SFPCA",
"SFPCA_0003",
""
]
]
}
Now you can parse it using this pojo class:
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class CheckResponse {
@SerializedName("ModuleEId")
@Expose
private List<List<String>> moduleEId = null;
public List<List<String>> getModuleEId() {
return moduleEId;
}
public void setModuleEId(List<List<String>> moduleEId) {
this.moduleEId = moduleEId;
}
}
The simple and easiest way to parse your json response is to use
http://www.jsonschema2pojo.org/
copy your response and paste it on jsonschema2pojo and select your class name. It will return you java pojo code. You can easily utilize that to parse it.
Important: But your json response should be valid.
Hope this will help you.