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 | 31 |
Tags
- uitableview
- combine
- UITextView
- map
- 애니메이션
- Observable
- RxCocoa
- Refactoring
- UICollectionView
- uiscrollview
- Clean Code
- 리펙토링
- ios
- rxswift
- 스위프트
- Human interface guide
- SWIFT
- Protocol
- collectionview
- swift documentation
- 리팩토링
- tableView
- ribs
- MVVM
- 리펙터링
- HIG
- 클린 코드
- clean architecture
- Xcode
- swiftUI
Archives
- Today
- Total
목록singleValueContainer (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] codable을 이용한 json 파싱
codable을 사용하여 json데이터를 가져오는 것 json자료형을 직접 파싱해서 사용하는 것은 코드상의 복잡함이 따름 -> 미리 struct형을 정해놓고 거기에 매핑되게끔하는 방법 case #1. 일반적인 사용방법 // json데이터 형태를 미리 정의 struct DataForm: Codable { var key_name1: String? var key_name2: String? } // json데이터 let sample = """ { "key_name1": "value1", "key_name2": "value2" } """.data(using: .utf8)! // 결과 let result = try! JSONDecoder().decode(DataForm.self, from: sample) print..
iOS 응용 (swift)
2020. 8. 30. 00:04