import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.HttpClientErrorException;
*/
private boolean isValidJSON(String response) {
try {
+ if(response != null && !response.isEmpty())
+ {
final ObjectMapper mapper = new ObjectMapper();
mapper.readTree(response);
return true;
+ }
+ else
+ {
+ return false;
+ }
} catch (IOException e) {
logger.debug(EELFLoggerDelegate.debugLogger, "isValidJSON failed", e);
return false;