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
140
Other Decks in Technology
See All in Technology
Monorepo Error Management: Automated Runbooks and Team-Targeted Alert Distribution
biwashi
1
130
FASTと向き合うことで見えた、大規模アジャイルの難しさと楽しさ
wooootack
0
390
AWS Lambdaでサーバレス設計を学ぼう_ベンダーロックインの懸念を超えて-サーバレスの真価を探る
fukuchiiinu
4
950
OpenTelemetry Collector internals
ymotongpoo
4
390
Tensix Core アーキテクチャ解説
tenstorrent_japan
0
270
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
270
libsyncrpcってなに?
uhyo
0
260
Generational ZGCのメモリ運用改善 - その物理メモリ使用量、本当に正しい?
tabatad
1
290
20250514_未経験から Fintech実務参画まで。学生エンジニアの挑戦録
hideto1008
0
890
Kotlinで学ぶ 代数的データ型
ysknsid25
5
790
OpenJDKエコシステムと開発中の機能を紹介 2025夏版
chiroito
1
1.2k
Drawing with LLMs
rist
0
230
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
524
40k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
How to train your dragon (web standard)
notwaldorf
92
6.1k
The World Runs on Bad Software
bkeepers
PRO
68
11k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Practical Orchestrator
shlominoach
188
11k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Raft: Consensus for Rubyists
vanstee
138
7k
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非推奨あり - ベンチマークは対して大きな変化はない
ご清聴ありがとうございました