static String toJson(final Object arg) {
        try {
            return MAPPER.writeValueAsString(arg);
        } catch (final Exception e) {
            LOG.error(e.getMessage(), e);
        }
        return null;
    }
Convert object to JSON.

@param arg the arg
@return the string
api/cas-server-core-api-audit/src/main/java/org/apereo/inspektr/audit/AuditTrailManager.java