Moshi in Android Kotlin - ENUM as MutableMap key being converted to String when deseralized
问题 I have a MutableMap<CryptoTypes, CurrentTradingInfo> that I'm wanting to save in onSaveInstanceState and was going to use Moshi to convert back and forth. CryptoTypes is an ENUM private var tickerData: MutableMap<CryptoTypes, CurrentTradingInfo> = mutableMapOf() fun convertTickerDataJson(): String { val moshi = Moshi.Builder().build() val jsonAdapter = moshi.adapter<MutableMap<CryptoTypes, CurrentTradingInfo>>(MutableMap::class.java) return jsonAdapter.toJson(tickerData) } fun