Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kotlin Serializationことはじめ
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
slme
August 24, 2019
Technology
1
1.1k
Kotlin Serializationことはじめ
slme
August 24, 2019
Tweet
Share
More Decks by slme
See All by slme
ViewModel SavedState
slme
1
140
EXIA.pdf
slme
0
150
Other Decks in Technology
See All in Technology
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
22k
Kusakabe_面白いダッシュボードの表現方法
ykka
0
380
SOC2は、取った瞬間よりその後が面白い
3flower
0
160
なぜCREを8年間続けているのか / cre-camp-4-2026-01-21
missasan
0
1.1k
Claude Codeベストプラクティスまとめ
minorun365
36
19k
人はいかにして 確率的な挙動を 受け入れていくのか
vaaaaanquish
4
2.3k
ソフトとハード両方いけるデータ人材の育て方
waiwai2111
1
550
コミュニティが持つ「学びと成長の場」としての作用 / RSGT2026
ama_ch
2
450
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
64k
VRTと真面目に向き合う
hiragram
1
420
Databricks Free Editionで始めるLakeflow SDP
taka_aki
0
180
AWS監視を「もっと楽する」ために
uechishingo
0
290
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
300
Mobile First: as difficult as doing things right
swwweet
225
10k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
280
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Exploring anti-patterns in Rails
aemeredith
2
230
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
120
Facilitating Awesome Meetings
lara
57
6.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
68
Transcript
KotlinSerialization ことはじめ 概要と入門
$ whoami - slme(スルメ) - @slme_not_found - DMM.com Androidエンジニア -
新卒エンジニア
What is Kotlin Serialization
What is it - 1.3以降あたりで導入された機能 - CBOR, JSON, ProtoBufをサポート -
100%Kotlin実装 - カスタムシリアライザで自作できる - reflectionを使わない
None
Http clientとの組み合わせは?
Ktor Client
Retrofit https://github.com/JakeWharton/retrofit2-kotlinx-serialization-converter
Retrofitの場合: Moshi, Gson Ktorの場合: Kotlin Serialization
Moshi, GsonはOkioを使っている ↓ OkHttpを扱う際はそちらのほうが相性が良い
About Kotlin Serialization - メリット - 100% Kotlin実装 - 色々な形式を扱う時に単一で済む
- カスタムシリアライザで自作できる - デメリット - JSON単一で扱うかつKotlin/JVMならばMoshiで良い感 - Serializationを用いてkamlのように作ってもJVM依存が生まれたりする - 一部不安定 or 非推奨がある
速度は?
https://github.com/wizzardo/json-benchmarks
形式にもよるが大きな変化はない
まとめ - KotlinMPPを考えないかつJSONのみであればMoshiなどで充分 - @Seralizableを使うことでJSON以外にもserialize可能になる - 一部 不安定or非推奨あり - ベンチマークは対して大きな変化はない
ご清聴ありがとうございました