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
1.1k
Kotlin Serializationことはじめ
slme
August 24, 2019
Tweet
Share
More Decks by slme
See All by slme
ViewModel SavedState
slme
1
150
EXIA.pdf
slme
0
150
Other Decks in Technology
See All in Technology
FASTでAIエージェントを作りまくろう!
yukiogawa
4
120
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
100
FlutterでPiP再生を実装した話
s9a17
0
210
Laravelで学ぶOAuthとOpenID Connectの基礎と実装
kyoshidaxx
4
1.9k
韓非子に学ぶAI活用術
tomfook
3
1k
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
16k
FastMCP OAuth Proxy with Cognito
hironobuiga
3
210
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
130
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
360
Phase01_AI座学_基礎
overflowinc
0
4.3k
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
100
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
190
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
160
Navigating Weather and Climate Data
rabernat
0
150
A better future with KSS
kneath
240
18k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Technical Leadership for Architectural Decision Making
baasie
3
300
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
GitHub's CSS Performance
jonrohan
1032
470k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
210
The Invisible Side of Design
smashingmag
302
51k
From π to Pie charts
rasagy
0
160
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非推奨あり - ベンチマークは対して大きな変化はない
ご清聴ありがとうございました