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
Extending kotlinx.serialization functionality w...
Search
Karin-Aleksandra Monoid
June 08, 2022
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Extending kotlinx.serialization functionality with Arrow Meta (Joker 2021/KotlinDevDay 2022)
Karin-Aleksandra Monoid
June 08, 2022
More Decks by Karin-Aleksandra Monoid
See All by Karin-Aleksandra Monoid
Treasure.map(): Functional programming in JVM-based languages
paranoidmonoid
0
330
Extending kotlinx.serialization functionality with Arrow Meta
paranoidmonoid
0
120
Functional Kotlin with Arrow (jLove 2021)
paranoidmonoid
1
240
Hands-on Arrow
paranoidmonoid
1
170
Make Tech Slides Work
paranoidmonoid
0
620
"Fun" as in "funeral": full-stack development using Kotlin JS
paranoidmonoid
0
130
Other Decks in Programming
See All in Programming
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
620
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
280
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
260
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
150
Lessons from Spec-Driven Development
simas
PRO
0
230
ふつうのFeature Flag実践入門
irof
8
4.2k
スマートグラスで並列バイブコーディング
hyshu
0
270
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.7k
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
act1-costs.pdf
sumedhbala
0
140
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
300
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
270
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
480
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
250
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
A Soul's Torment
seathinner
6
3k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
180
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Transcript
1 Extending kotlinx.serialization functionality with Arrow Meta Karin-Aleksandra Monoid Kotlin
Dev Day 2022
2 • Senior Software Engineer at CircleCI • Background in
Kotlin & Scala (both front and backend) • Living in Germany with two cats • GDE in Kotlin About
3 • Senior Software Engineer at CircleCI • Background in
Kotlin & Scala (both front and backend) • Living in Germany with two cats • GDE in Kotlin About
4 Agenda Why? What is Arrow Meta? Sample project Showtime!
5 Project Stack • Just backend with Ktor + Arrow
• Jackson was kind of "default" • Smooth but not Kotlin-first
6 kotlinx.serialization – pros 🚀 • Kotlin-first • No boilerplate
for sealed classes
7 kotlinx.serialization – cons • Not a lot of serializers
out of the box • No global naming strategy
8 Global Naming Strategy UPPER_SNAKE_CASE -> camelCase USER_NAME -> userName
9 Jackson: Object Mapper val objectMapperUpperSnakeCase = jacksonObjectMapper().apply { propertyNamingStrategy
= PropertyNamingStrategies.UPPER_SNAKE_CASE }
10 Issue #33 https://github.com/Kotlin/kotlinx.serialization/issues/33
11 Global Naming Strategy @SerialName("USER_NAME") val userName: String
12 What is Arrow Meta?
13 “Functional companion to Kotlin's Compiler” What is Arrow Meta?
Image source: https://arrow-kt.io/
14 GIF source: https://github.com/arrow-kt/arrow-meta
15 • Already using other part of Arrow for FP
Why Arrow Meta?
16 Why Arrow Meta? • More functionality than KSP/KAPT •
Easier than kotlinc
17 Sample Project
18 https://bit.ly/3C2lHGp Link to repo
19 • various animals (actually, only cats and dogs) •
various sources (= 3rd party services) • various standards of documentation (in JSON format with different naming policies) Setting: a Zoo
20 Live coding time
21 • It works • ??? • Requires more knowledge
than expected • KSP is preferable if it fits Thoughts
22 Resources • https://meta.arrow-kt.io/ • https://github.com/arrow-kt/arrow-meta-examples • https://paranoidmonoid.github.io/articles/Kotlin%20and%20frien ds/Naming%20strategy%20plugin