当前位置:网站首页>Swiftyjson analyse les fichiers json locaux
Swiftyjson analyse les fichiers json locaux
2022-06-12 02:06:00 【JH Cao】
SwiftyJSON
1. LocalJSONDocumentation
[
{
"name": "hangge",
"age": 100,
"phones": [
{
"name": "Entreprises",
"number": "123456"
},
{
"name": "La famille",
"number": "001"
}
]
},
{
"name": "big boss",
"age": 1,
"phones": [
{
"name": "Entreprises",
"number": "111111"
}
]
}
]
2. demo
override func viewDidLoad() {
super.viewDidLoad()
let path = Bundle.main.path(forResource: "testData", ofType: "json")!
let testData = NSData(contentsOfFile: path)
let json = try! JSON(data: testData! as Data)
if let number = json[0]["phones"][0]["number"].string {
print("Téléphone:",number)
}
}
边栏推荐
- MySQL advanced knowledge points
- 通用树形结构的迭代与组合模式实现方案
- 如何最大化的利用各种匹配方式? ——Google SEM
- Explore performance optimization! Performance improvement from 2 months to 4 hours!
- CVPR2022 | iFS-RCNN:一种增量小样本实例分割器
- 商城开发知识点
- What are the preparations for setting up Google search advertising series?
- Linux (centos7) installer mysql - 5.7
- 力扣解法汇总732-我的日程安排表 III
- Navicat for MySQL 11 Linux 破解方法
猜你喜欢

Why do we use Google search ads?

Knowledge points of mall development

RPA introduction

Glfwpollevents() program crash

为什么我们要使用谷歌搜索广告?

How to automatically color cells in Excel

Basedexclassloader

MySQL advanced knowledge points

Graphic data analysis | data cleaning and pretreatment

How WPS inserts a directory and the operating steps for quickly inserting a directory
随机推荐
leetcode:6. Zigzag transformation
Operating mechanism of Google ads bidding
Wide match modifier symbol has been deprecated, do not use
C language programming classic games - minesweeping
Almost all schools will ask for the second round exam! Come in and recite the answer!
Advantages of Google ads
Three main factors determining advertising quality
A mystery of the end of vagrant up
力扣解法汇总868-二进制间距
What insurance products can you buy at the age of 60?
为什么我们要使用谷歌搜索广告?
How to improve the advertising rating of advertising, that is, the quality score?
入手Ticwatch2
LeetCode LCP 07. Deliver information
MySQL高级部分知识点
力扣解法汇总396-旋转函数
MySQL表常用操作思维导图
UE4\UE5触摸屏touch事件:单指、双指
力扣解法汇总-剑指 Offer II 114. 外星文字典
力扣解法汇总699-掉落的方块