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
340
Extending kotlinx.serialization functionality with Arrow Meta
paranoidmonoid
0
130
Functional Kotlin with Arrow (jLove 2021)
paranoidmonoid
1
250
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
Deep dive into the select statement (GopherCon UK)
jespino
0
150
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
560
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.3k
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
5
550
バグを直したら useEffect が消えた
colorful12
3
770
AIの中の人になってみる
htkym
0
140
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
270
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
650
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.8k
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
120
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Tell your own story through comics
letsgokoyo
1
1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
820
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
500
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.5k
Skip the Path - Find Your Career Trail
mkilby
1
200
A Tale of Four Properties
chriscoyier
163
24k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
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