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
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
160
EXIA.pdf
slme
0
160
Other Decks in Technology
See All in Technology
What Is JetBrains Air
x5gtrn
PRO
0
140
フィンテック養成勉強会#68
finengine
0
190
ストレスなくAIと付き合いたい!こんなときどうしてる?
namiki64
4
660
Optunaの最新リリースv5.0について
pfn
PRO
0
130
ウォンテッドリーの最近のプロダクトと技術の紹介
stomk
0
320
Refining Active Record
shugo
0
190
DBについての基礎説明(MySQL編) - コロプラ 2026年度 新卒研修
colopl
0
160
AI駆動開発における開発環境のセキュリティの考え方
yamahiro
0
230
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
130
AIネイティブ企業への変革。パーソルキャリアが挑む「データメッシュ×ガバナンス」のアーキテクチャ戦略
techtekt
PRO
0
120
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
470
こんにちは!SORACOM です & IoT とは【SORACOM UG 東北 in 八戸】
soracom
PRO
0
170
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
310
Are puppies a ranking factor?
jonoalderson
2
4.1k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Between Models and Reality
mayunak
4
500
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Building the Perfect Custom Keyboard
takai
2
910
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
640
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
360
Accessibility Awareness
sabderemane
1
250
The Cult of Friendly URLs
andyhume
79
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非推奨あり - ベンチマークは対して大きな変化はない
ご清聴ありがとうございました