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
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kotlin Serializationことはじめ
slme
August 24, 2019
More Decks by slme
See All by slme
ViewModel SavedState
slme
1
150
EXIA.pdf
slme
0
160
Other Decks in Technology
See All in Technology
Backstageでつくるセルフサービスな社内開発基盤
kikunosuke75
1
240
プロダクトエンジニアに必要な「いい感じ」に作る能力 〜たくさん作れる時代に、どこまで作るかの決め方〜
jnishime_dresscode
2
1.3k
最新技術に積極チャレンジ!EKS共通基盤のこれまでとこれから
daitak
0
300
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
0
380
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
3
930
Azure Cost Management の FOCUS コストデータを迷わず読むための“3つの軸”
tetsuyaooooo
0
140
Self Healing Rollouts: Automating Production Fixes with Agentic AI
kdubois
0
150
Beyond the Hype: Practical AI for Your Oracle Database with MCP
thatjeffsmith
1
240
When Does a Local Qwen Start to Break
morshoto
0
170
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
0
150
Tab5をRubyで動くパソコンにする
kishima
1
170
KAEN Company Deck
kaen
PRO
0
300
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
520
Amusing Abliteration
ianozsvald
1
290
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
500
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
490
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Documentation Writing (for coders)
carmenintech
77
5.5k
Embracing the Ebb and Flow
colly
88
5.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The Limits of Empathy - UXLibs8
cassininazir
1
630
Leo the Paperboy
mayatellez
8
2.2k
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非推奨あり - ベンチマークは対して大きな変化はない
ご清聴ありがとうございました