All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.seejoke.wechat.entity.KfSender Maven / Gradle / Ivy

package com.seejoke.wechat.entity;

import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

import java.io.IOException;

public class KfSender extends SenderContent {
  private String touser;
  private String msgtype;

  public String getTouser() {
    return touser;
  }

  public void setTouser(String touser) {
    this.touser = touser;
  }

  public String getMsgtype() {
    return msgtype;
  }

  public void setMsgtype(String msgtype) {
    this.msgtype = msgtype;
  }


  public String toJson() throws IOException {
    ObjectMapper mapper = new ObjectMapper();
    mapper.setSerializationInclusion(Inclusion.NON_NULL);
    return mapper.writeValueAsString(this);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy