惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
Security Latest
Security Latest
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
Cybersecurity and Infrastructure Security Agency CISA
Cloudbric
Cloudbric
T
Threat Research - Cisco Blogs
大猫的无限游戏
大猫的无限游戏
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
C
Cisco Blogs
V
Vulnerabilities – Threatpost
S
Security Archives - TechRepublic
V
Visual Studio Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
J
Java Code Geeks
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Know Your Adversary
Know Your Adversary
博客园 - 叶小钗
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
P
Palo Alto Networks Blog
博客园_首页
V
V2EX
WordPress大学
WordPress大学
Schneier on Security
Schneier on Security
月光博客
月光博客
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
TaoSecurity Blog
TaoSecurity Blog
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
美团技术团队
N
News | PayPal Newsroom
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Last Week in AI
Last Week in AI
K
Kaspersky official blog
Google Online Security Blog
Google Online Security Blog
S
SegmentFault 最新的问题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog

Lan小站-嗯,不错! - 安卓

android stadio 一直在下载download fastutil-7.2.0.jar - Lan小站-嗯,不错! Android为属性组件动画无效 - Lan小站-嗯,不错! JavaScript调用Android方法,显示Echarts - Lan小站-嗯,不错! 安卓实时获取数据并刷新图表 - Lan小站-嗯,不错! 按照第一行代码使用ToolBar报错。 - Lan小站-嗯,不错! Android webView打开网页 - Lan小站-嗯,不错! Android VideoView播放视频 - Lan小站-嗯,不错! 安卓MPAndroidChart绘制水平柱状图 - Lan小站-嗯,不错! 安卓MPAndroidChart绘制多层级的堆叠条形图 - Lan小站-嗯,不错!
Gson解析百度实时热榜Json数据 - Lan小站-嗯,不错!
Lan · 2020-10-22 · via Lan小站-嗯,不错! - 安卓
OkHttpClient okHttpClient = new OkHttpClient();
Request request = new Request.Builder().url("http://top.baidu.com/mobile_v2/buzz/hotspot").build();
try {
    Response response = okHttpClient.newCall(request).execute();
    ArrayList<NewsContent> newss = new ArrayList<>();
    JsonObject a = JsonParser.parseString(response.body().string()).getAsJsonObject();
    JsonElement result = a.get("result").getAsJsonObject().get("descs");
    JsonArray jsonArray = result.getAsJsonArray();
    for (JsonElement newContent : jsonArray) {
        NewsContent newsContent = new Gson().fromJson(newContent.getAsJsonObject().get("content").getAsJsonObject().get("data").getAsJsonArray().get(0).toString(), NewsContent.class);
        newss.add(newsContent);
        Log.d("标题", newsContent.getTitle());
    }
} catch (IOException e) {
    e.printStackTrace();
}