Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- widgetkit
- 스유
- 알고리즘
- 대외활동
- 리액트
- Swift
- 웹
- 네트워크
- cs
- 백준
- 멋쟁이사자처럼
- Protocol
- TCA
- 멋사
- swift concurrency
- 영남대
- widget
- 후기
- c++
- 위젯킷
- 운영체제
- ReactorKit
- 스위프트
- spritekit
- 문법
- composable architecture
- 컴퓨터그래픽스
- SwiftUI
- dispatchqueue
- uikit
Archives
- Today
- Total
목록JSON파싱 (1)
맛동산이

DecodableDecoder는 JSON type으로 오는 데이터를 네이티브한 포멧과 매핑이 가능하도록 하는 프로토콜이다.보통 Codable이 Encodable, Decodable 두개를 타입엘리어싱 하기 때문에 Codable만 채택해도 큰 문제는 없다.CodingKey실제로 RESTFUL API와 실제로 내부에서 사용하는 데이터의 네이밍이 다른경우가 많은데 이를 코딩키를 통해서 매핑해줄수 있다.struct DecodingModel: Decoding { let userName: String let userAge: Int enum CodingKeys: String, CodingKey { case userName = "user_name" case userAge = "user_age" ..
앱/Swift
2024. 6. 6. 14:58