@Test
    public void test3() {
        PgwReqtBody3002 pgwReqtBody3002 = new PgwReqtBody3002();
        pgwReqtBody3002.setService("1");

        JsonConfig jsonConfig = new JsonConfig();
        jsonConfig.setJsonPropertyFilter(new PropertyFilter() {
            @Override
            public boolean apply(Object obj, String key, Object value) {
                if (value == null) {
                    return true;
                }
                return false;
            }
        });
        JSONObject j = JSONObject.fromObject(pgwReqtBody3002, jsonConfig);

        System.out.println(j.toString());

    }

 

相关文章:

  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
猜你喜欢
  • 2021-10-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案