formated_response=new LogserviceResponse("failure","Authentication error, check your credentials");
return formated_response;
}
try{
JSONObject json=(JSONObject)JSONValue.parse(response);
formated_response=new LogserviceResponse((String)json.get("status"),(String)json.get("message"));
ArrayList<JSONObject> logs=(ArrayList<JSONObject>)json.get("data");
if(logs!=null){
ArrayList<Object> data=new ArrayList<Object>();
Log log=null;
for(JSONObject obj:logs){
log=new Log(Integer.parseInt((String)obj.get("level")),(String)obj.get("title"),(String) obj.get("description"), (String )obj.get("emiter_email"), (Map<String, String>) obj.get("custom_fields") , (String) obj.get("stack_trace"));