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
140
EXIA.pdf
slme
0
150
Other Decks in Technology
See All in Technology
「AIでできますか?」から「Agentを作ってみました」へ ~「理論上わかる」と「やってみる」の隔たりを埋める方法
applism118
11
7.6k
Regional_NAT_Gatewayについて_basicとの違い_試した内容スケールアウト_インについて_IPv6_dual_networkでの使い分けなど.pdf
cloudevcode
1
180
2026年はチャンキングを極める!
shibuiwilliam
7
1.6k
DatabricksホストモデルでAIコーディング環境を構築する
databricksjapan
0
200
Claude Codeベストプラクティスまとめ
minorun365
52
29k
AI時代のPMに求められるのは 「Ops」と「Enablement」
shimotaroo
1
480
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
72k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
ファシリテーション勉強中 その場に何が求められるかを考えるようになるまで / 20260123 Naoki Takahashi
shift_evolve
PRO
3
400
[Iceberg Meetup #4] ゼロからはじめる: Apache Icebergとはなにか? / Apache Iceberg for Beginners
databricksjapan
0
540
Agentic Coding 実践ワークショップ
watany
41
28k
AI推進者の視点で見る、Bill OneのAI活用の今
sansantech
PRO
2
260
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
A Soul's Torment
seathinner
5
2.2k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
Facilitating Awesome Meetings
lara
57
6.7k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
160
Code Reviewing Like a Champion
maltzj
527
40k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
What's in a price? How to price your products and services
michaelherold
247
13k
Paper Plane
katiecoart
PRO
0
46k
Practical Orchestrator
shlominoach
191
11k
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非推奨あり - ベンチマークは対して大きな変化はない
ご清聴ありがとうございました