svenjacobs
09/20/2017, 7:59 AMenum class Status { OK, FAILED }
to a JSON response (with Moshi). Unfortunately the JSON values are written in lower case like “ok” or “failed” and it’s not possible to overwrite the enum classes’ values. Any chances this is somehow possible or do I have to write a custom Moshi adapter?jmesserli
09/20/2017, 8:04 AM@Json
annotation: https://github.com/square/moshi#custom-field-names-with-jsonsvenjacobs
09/20/2017, 8:13 AM@Json
on each enum value (like enum class Status { @Json(name = "ok") OK }
works! :) Thanks!