com.seejoke.wechat.entity.result.WxNewsMediaResult Maven / Gradle / Ivy
package com.seejoke.wechat.entity.result;
import com.seejoke.wechat.entity.WxNewsInfo;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class WxNewsMediaResult {
private List news_item = new ArrayList<>();
private String update_time;
private String create_time;
public String getUpdate_time() {
return update_time;
}
public void setUpdate_time(String update_time) {
this.update_time = update_time;
}
public String getCreate_time() {
return create_time;
}
public void setCreate_time(String create_time) {
this.create_time = create_time;
}
public List getNews_item() {
return news_item;
}
public void setNews_item(List news_item) {
this.news_item = news_item;
}
public static WxNewsMediaResult fromJson(String json) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return mapper.readValue(json, WxNewsMediaResult.class);
}
@Override
public String toString() {
return "WxNewsMediaResult [news_item=" + news_item + ", update_time=" + update_time + ", create_time="
+ create_time + "]";
}
}