JsonObject 使用注意

2019-11-25  本文已影响0人  忘记_3a6a
    public void sendEmailUseXUrl( EmailXSendParams emailXSendParams){
        JSONObject jsonObject=new JSONObject();
        jsonObject.put("appid","");
        jsonObject.put("name",emailXSendParams.getAppId());
        System.out.println(jsonObject.toString());

        JsonObject jsonObject1=new JsonObject();
        jsonObject1.addProperty("appId","");
        jsonObject1.addProperty("name",emailXSendParams.getAppId());
        System.out.println(jsonObject1.toString());
    }
    public void sendEmailUseXUrl() {
        EmailXSendParams emailXSendParams=new EmailXSendParams();
        emailService.sendEmailUseXUrl(emailXSendParams);
    }
{"appid":""}
{"appId":"","name":null}
上一篇下一篇

猜你喜欢

热点阅读