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
slme
August 24, 2019
Technology
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
130
Other Decks in Technology
See All in Technology
SREが実現する開発者体験の革新
sansantech
PRO
0
150
テキスト解析で見る PyCon APAC 2025 セッション&スピーカートレンド分析
negi111111
0
270
大AI時代で輝くために今こそドメインにディープダイブしよう / Deep Dive into Domain in AI-Agent-Era
yuitosato
1
100
OSSコントリビュートをphp-srcメンテナの立場から語る / OSS Contribute
sakitakamachi
0
1.1k
近年の PyCon 情勢から見た PyCon APAC のまとめ
terapyon
0
280
React Server Componentは 何を解決し何を解決しないのか / What do React Server Components solve, and what do they not solve?
kaminashi
6
1.4k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
21k
TopAppBar Composableをカスタムする
hunachi
0
170
IVRyにおけるNLP活用と NLP2025の関連論文紹介
keisukeosone
0
170
アセスメントで紐解く、10Xのデータマネジメントの軌跡
10xinc
0
140
Multitenant 23ai の全貌 - 機能・設計・実装・運用からマイクロサービスまで
oracle4engineer
PRO
2
180
GitHub MCP Serverを使って Pull Requestを作る、レビューする
hiyokose
2
680
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Building a Modern Day E-commerce SEO Strategy
aleyda
39
7.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
29
2k
How STYLIGHT went responsive
nonsquared
99
5.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Done Done
chrislema
183
16k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
12
1.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
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非推奨あり - ベンチマークは対して大きな変化はない
ご清聴ありがとうございました