We can use kotlinx-serialization to serialize and deserialize objects of custom types. This tutorial shows how to do it.
Also find me here:
Baeldung Editor
Ashley Frieze
I've been writing software since I was a kid, and have been doing it professionally since the days of dial-up internet. These days I'm a consultant, helping teams with full stack cloud projects in Java and TypeScript. When I'm not software engineering, I can be found performing as a stand-up comedian, or in musical theater.
Here's what I've reviewed (so far):
Baeldung on Kotlin
- All
- Libraries (3)
- Kotlin Collections (2)
- Spring (1)
- Kotlin Strings (1)
- Kotlin Functions (1)
- Kotlin Concurrency (1)
- Kotlin Classes and Objects (1)
- Asynchronous Programming (1)
Using Lombok With Kotlin
Filed under Libraries
While Kotlin provides many features that remove the need for Lombok, we may wish to use Lombok with Java classes in Kotlin. We look at how this is possible and its limitations.
Difference Between Flows and Channels in Kotlin
Filed under Kotlin Concurrency
Flows and channels allow Kotlin to process data. Here, we look at the differences between them.
Why We Should Avoid Using Open Members in Kotlin Constructors
Filed under Kotlin Classes and Objects
Using open members in constructors in Kotlin is possible but may lead to unexpected results. We look at how they work and how to avoid using them.
Convert a Kotlin Data Class Object to a Map
Filed under Kotlin Collections, Libraries
While a data class may be a useful strongly typed way to store date, we may wish to convert our data objects into a more dynamic structure, such as a Map. We look at a few solutions for converting between data classes and maps.
Remove a Character From a String in Kotlin
Filed under Kotlin Strings
When we need to remove characters from strings in Kotlin, there are a few extension functions we can use to help us. We look at the most common ways to produce a new string with a character removed.
Iterate Over a Map in Kotlin
Filed under Kotlin Collections
There are a few ways to iterate over the keys and values in a Kotlin map. We look at some of the options and which is more efficient at runtime.
Quick Guide to Kotlin Default and Named Arguments
Filed under Kotlin Functions
We can avoid providing long lists of inputs, or defining multiple overloads of a function, by using a combination of named parameters and defaults.
Non-Blocking Spring Boot with Kotlin Coroutines
Filed under Asynchronous Programming, Spring
Find out how to write clean reactive code with Spring Boot and Kotlin co-routines, which make asynchronous code look as straightfoward as synchronous.