A
Size: a a a
A
O
DA
AG
AG
TS
AG
AG
TS
NK
struct Response: Codable {
let response: Any?
let timestamp: Int?
enum CodingKeys: String, CodingKey {
case response = "response"
case timestamp = "timestamp"
}
func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(response, forKey: .response)
try container.encode(timestamp, forKey: .timestamp)
}
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
response = try container.decode(Any.self, forKey: .response)
timestamp = try container.decode(Int.self, forKey: .timestamp)
}
}
TS
NK
NK
NK
TS
NK
{
"response": {
"access_token": "d8f7a16c63f6e2940d13720258297835169274b9a2cceb130aa4ae48552a3d66",
"token_type": "bearer",
"expires_in": 631152000,
"scope": "public",
"created_at": 1573227346
},
"timestamp": 1573227346
}
NK
{ "timestamp": 1573223546,
"response": {
"jogs": [
{
"id": 8,
"user_id": "6",
"distance": 500,
"time": 500,
"date": 2550776400
},
{
"id": 9,
"user_id": "5",
"distance": 293,
"time": 3,
"date": 1481099624
}
],
"users": [
{
"id": "3",
"email": "hello@stickerbox.internal",
"phone": "",
"role": "admin",
"first_name": "Nick",
"last_name": "Medry"
}
]
}
NK
A
DA