```json
{
"userData": "
[email protected]",
"pwnedCount": "3",
"pwnedInfo": [
{"title": "Youku",
"url": "
https://monitor.firefox.com/breach-details/Youku",
"date": "2017-04-15",
"data": "Passwords, Email addresses"
},
{"title": "Tianya",
"url": "
https://monitor.firefox.com/breach-details/Tianya",
"date": "2016-06-30",
"data": "Email addresses"
},
{"title": "000webhost",
"url": "
https://monitor.firefox.com/breach-details/000webhost",
"date": "2015-10-26",
"data": "Passwords, IP addresses"}
],
"returnCode": 200
}
```
```swift
//Model 解析 JSON 数据
struct Ccdjh: Codable,Hashable {
var userData : String?
var pwnedCount : String?
var returnCode:String?
var pwnedInfo:[CcdjhPwnedInfo]?
}
struct CcdjhPwnedInfo: Codable,Hashable {
var title : String?
var url : String?
var date:String?
var data:String?
}
//Test 数据
let p1 = CcdjhPwnedInfo(
title: "Youku",
url: "
https://monitor.firefox.com/breach-details/Youku",
date: "2017-04-15",
data: "Passwords, Email addresses"
)
let p2 = CcdjhPwnedInfo(
title: "Tianya",
url: "
https://monitor.firefox.com/breach-details/Tianya",
date: "2016-06-30",
data: "Email addresses"
)
let p3 = CcdjhPwnedInfo(
title: "000webhost",
url: "
https://monitor.firefox.com/breach-details/000webhost",
date: "2015-10-26",
data: "Passwords, IP addresses"
)
let Cc = Ccdjh(
userData: "
[email protected]",
pwnedCount: "3",
returnCode: 200,
pwnedInfo: [p1,p2,p3]
)
//使用数据
Text("\(Cc.userData!)")
```