Now the problem is fixed, now your code works fine in Kotlin M9 (0.9.66). If you switch to this, it will work as you expect.
eg.
app build.gradle
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'org.jetbrains.kotlin:kotlin-stdlib:0.9.66' compile 'com.google.code.gson:gson:2.3' }
top level build.gradle
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:0.13.2' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:0.9.+' } }
I confirmed this by doing an enumeration without any relationship between the enum names and the SerializedName names, and it worked as expected.
source share