Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
クリぼっちの自分が信じられるのはもはや型のみである
Search
Ryota Sakaguchi
December 25, 2018
Technology
490
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
クリぼっちの自分が 信じられるのは もはや型のみである
Ryota Sakaguchi
December 25, 2018
More Decks by Ryota Sakaguchi
See All by Ryota Sakaguchi
大切なことは全てLintが教えてくれた
kuluna
0
59
時間を意識する推しツールたち / Time-aware tools
kuluna
1
660
DroidKaigi2020 - Data Bindingのイロハ
kuluna
1
1.5k
チームでつくる RESTful API
kuluna
1
12k
Other Decks in Technology
See All in Technology
V8コントリビュート超入門
riyaamemiya
0
160
『止めない』を設計する — 制約の中で、事業の根幹を支える判断
hiroyaterui
0
240
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
220
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
1
300
現場に行くだけでは足りない——プロダクトエンジニアが業務の流れを捉える観点と、その鍛え方
takumiengineering
0
370
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
150
Adaptive Warehouse を今すぐ導入すべき理由と迷ったときの判断基準
__allllllllez__
0
140
#jawssonic2026 あの時代が悪かった ~動かなかったSageMakerと共に迎えたイベント当日~
ktkn1129
0
140
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
140
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
120
コーディングエージェントでM5Stack系の開発を少し試した時の話 / M5 Japan Tour 2026 Autumn 東京
you
PRO
0
110
When Does a Local Qwen Start to Break
morshoto
0
190
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
For a Future-Friendly Web
brad_frost
183
10k
エンジニアに許された特別な時間の終わり
watany
108
250k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
My Coaching Mixtape
mlcsv
0
310
The SEO Collaboration Effect
kristinabergwall1
1
550
Bash Introduction
62gerente
615
220k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
KATA
mclloyd
PRO
35
15k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
{ "shop": { "id": 1, "name": "", "employees": [ {
"id": 1, "job_id": 1, "name": "kuluna" } ] } }
import Foundation struct Employee: Decodable { let id: Int let
job_id: Int let name: String } struct Shop: Decodable { let id: Int let name: String let employees: [Employee] } struct ShopResponse: Decodable { let shop: Shop }
let response = try! JSONDecoder().decode( ShopResponse.self, from: json.data(using: .utf8)! )
print(response.shop.name) // “”
☺
let shop = response.shop shop.id == shop.employees.first?.job_id
let newEmployee = Employee( id: shop.id, job_id: 0, name: "Sakaguchi"
)
!
-
!
struct ShopId: Codable, Equatable { let value: Int init(_ value:
Int) { self.value = value } public init(from decoder: Decoder) throws { self.value = try decoder.singleValueContainer().decode(Int.self) } public func encode(to encoder: Encoder) throws { var c = encoder.singleValueContainer() try c.encode(self.value) } }
struct Shop: Decodable { let id: ShopId let name: String
let employees: [Employee] }
☺ ☺ Comparable