Design of Kotlin Serialization
summary
Library design centers on a compiler plugin plus runtime that compiler plugin generates serializers so Kotlin classes serialize without reflection and produce no-reflection, compile-time errors when a serializer is missing. It targets JVM JS and Native, reuses one serializer across JSON protobuf or custom formats, and exposes a descriptor tree for schema or SQL/resultset binding. Demo implementations include a custom Bundle writer, a content-hash encoder, and a prepared-statement encoder that all compile and run across platforms.
AI-written summary · about
chapters (18)
- 0:00DESIGN OF KOTLINX.SERIALIZATION LEONID STARTSEV
- 0:58At a first glance, it looks like a regular JSON library
- 2:24Kotlin-oriented
- 5:01Implicit requires opt-in
- 6:44Explicit & concise & compile-time safe
- 7:42Formats are pluggable
- 8:22Difference between serializer and format
- 9:41Formats have their specific configuration
- 10:24Why @Serializable and apply plugin::.'?
- 11:40What is a compiler plugin, anyway?
- 14:40Which methods does Encoder have?
- 17:06How to handle structured data
- 17:40Transform from multiple values
- 21:31SerialDescriptor
- 22:46Format interfaces don't tell you anything about... format
- 27:08JSON Schema
- 28:30Roadmap
- 30:59THANK YOU AND REMEMBER TO VOTE
related talks
24mWhat is Kotlin Serialization, and should I use it?
42mPerformant Multiplatform Kotlin Serialization
36mPerformant Multiplatform Kotlin Serialization
27mkotlinx.serialization 1.0
54mKotlinx.serialization: Building Your Own Serialization Library
43mSpring and Kotlin: Work with Any Format!
01h 13mThe Magic of Kotlin Compiler Extensions
38mWhat's New & Cool in Kotlin Tools
