public static <T> String from(T obj) throws Exception {
        String json = fromObject(obj).trim();
        if (json.length() < 3) {
            json = "";
        } else if ((json.charAt(0) != '{' && json.charAt(json.length() - 1) != '}') &&
                (json.charAt(0) != '[' && json.charAt(json.length() - 1) != ']')) {
            json = "";
        }
        return json;
    }