关闭

Json串(没用)

101人阅读 评论(0) 收藏 举报

package com.bw.news.bean;

import java.util.List;

public class Bean {

	public List<Item> item;

	public List<Slides> slides;

	// 第一个ITEM

	public class Item {
		// 点击量
		public String commentsall;
		// 图片名字
		public String documentId;
		// 图片
		public String thumbnail;
		// 标题
		public String title;
		public String commentsUrl;
		public String id;
		public Link link;
		public Style style;

		@Override
		public String toString() {
			return "Item [commentsall=" + commentsall + ", documentId="
					+ documentId + ", thumbnail=" + thumbnail + ", title="
					+ title + ", link=" + link + ", style=" + style + "]";
		}

	}

	public class Slides {
		// 点击量
		public String commentsall;
		public Link link;
		public String title;
		public Style style;

	}

	public class Link {

	}

	public class Style {
		public List<String> images;

	}

}

http://api.iclient.ifeng.com/ClientNews?id=YL53,FOCUSYL53&page=2&gv=5.2.0&av=5.2.0&uid=285580250911796&deviceid=285580250911796&proid=ifengnews&os=android_19&df=androidphone&vt=5&screen=480x800&publishid=9023




XML


http://www.oschina.net/action/api/news_list



package com.example.Bean;

import java.util.List;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("oschina")
public class Bean {
	public String catalog;
	public String newsCount;
	public String pagesize;
	@XStreamAlias("newslist")
	public Newslist newslist;

	public class Newslist {
		@XStreamImplicit(itemFieldName = "news")
		public List<News> news;
	}

	public class News {
		public String id;
		public String title;
		public String body;
		public String commentCount;
		public String author;
		public String authorid;
		@XStreamImplicit(itemFieldName = "newstype")
		public List<Newstype> newstype;
		public String pubDate;
		public String url;

		@Override
		public String toString() {
			return "News [id=" + id + ", title=" + title + ", commentCount="
					+ commentCount + ", author=" + author + ", authorid="
					+ authorid + ", pubDate=" + pubDate + ", url=" + url
					+ ", body=" + body + ", newstype=" + newstype + "]";
		}
	}

	public class Newstype {
		public String type;
		public String authoruid2;
		public String attachment;
		public String eventurl;
	}
}




0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:475次
    • 积分:37
    • 等级:
    • 排名:千里之外
    • 原创:2篇
    • 转载:2篇
    • 译文:1篇
    • 评论:0条
    文章存档