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

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

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();
}