Skip to Content
Java数据科学实战
book

Java数据科学实战

by Michael R. Brzustowicz, PhD
January 2020
Intermediate to advanced
202 pages
5h 41m
Chinese
Posts & Telecom Press
Content preview from Java数据科学实战
10
|
第
1
章
int
year = cr.get(2);
String city = cr.get(3);
}
Apache Commons CSV
库也可以处理包括
CSVFormat.EXCEL
、
CSVFormat.MYSQL
以及
CSVFormat.TDF
在内的常见格式。
3.
解析
JSON
字符串
JSON
是一种用于对
JavaScript
对象进行序列化的协议,可以扩展到所有类型的数据。这
种紧凑且易读的格式普遍存在于因特网数据
API
中(特别是
RESTful
服务),并且是
许多
NoSQL
解决方案(例如
MongoDB
与
CouchDB
)的标准格式。自
9.3
版本开始,
PostgreSQL
数据库提供了
JSON
数据类型,可以查询原生
JSON
字段。其显著优势是便
于人类阅读,数据结构清晰可见,并且可以“优质打印”。就
Java
而言,
JSON
不过是
HashMaps
与
ArrayLists
的集合而已,可以采用能够想象到的任何嵌套配置。对于前面示例
的每一行数据,可以把那些值放入键
–
值对中,从而成为
JSON
字符串格式;字符串采用
双引号(而不是单引号)括起来,并且不允许尾端出现逗号。
{"
id
":1, "
year
":2015, "
city
":"San Francisco"}
{"
id
":2, "
year
":2014, "
city
":"New York"}
{"
id
":3, "
year
":2012, "
city
":"Los Angeles"}
注意,从技术上讲,整个文件本身不是
JSON
对象,把整个文件本身解析为 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

云安全实用指南

云安全实用指南

Chris Dotson
Kafka权威指南

Kafka权威指南

Neha Narkhede, Gwen Shapira, Todd Palino

Publisher Resources

ISBN: 9787115533302