Kotlin Serialization

That sounds like a very reasonable approach.