Android, Jetpack, Jetpack Datastore.
(requires Protobuf setup): // Define your data structure in a .proto file message UserPreferences { string username = 1; string email = 2; } // Generate classes from the .proto file using protoc compiler object UserPreferencesSerializer : Serializer { override fun readFrom(inputStream: