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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
認知負荷をGemini で溶かす — GKE 基盤「Orbit」における AI エージェントの実践
sansantech
PRO
1
270
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
660
関東Kaggler会発表資料
takoi
1
190
名古屋の市バスGTFS-JPデータ×スガキヤ 最寄りバス停検索をAmazon ElastiCache Serverless for Valkeyで最適化する
usanchuu
1
500
グローバル基準のSREは、運用現場でどう機能したか:成熟度アセスメントの実践 / SRE NEXT 2026
sorawatanabe
0
140
侵入は突然に 〜 IoTマルウェアと悪用される家庭の機器 ~ / When Intrusion Strikes: IoT Malware and the Abuse of Home Devices
nttcom
0
1.5k
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
6.8k
OSPN.JPバージョンアップ作業進捗のご報告 / 20260801-osc26kyoto
akkiesoft
0
420
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
0
110
サイバー捜査員研修(後半)
nomizone
1
810
LLM・AIエージェントシステムベストプラクティス
shibuiwilliam
2
490
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Rails Girls Zürich Keynote
gr2m
96
14k
My Coaching Mixtape
mlcsv
0
210
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
370
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
360
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
400
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
400
Ruling the World: When Life Gets Gamed
codingconduct
0
290
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非推奨あり - ベンチマークは対して大きな変化はない
ご清聴ありがとうございました