JSONObject json = JSONObject.fromString(msg);
logMessage = new LogMessage();
logMessage.setLocation(json.optString("location"));
logMessage.setMessageBody(json.optString("messageBody"));
logMessage.setTimestamp(json.optString("timestamp"));
logMessage.setLogLevel(json.optInt("logLevel"));
Object object = json.opt("messageObject");
//System.out.println("message object type = " + json.opt("messageObject").getClass());
//System.out.println("message object = " + json.opt("messageObject"));
if (object instanceof JSONNull)