igor.wojda
11/26/2018, 11:39 AMenum class LastFmImageSize {
@field:Json(name = "medium")
MEDIUM,
@field:Json(name = "small")
SMALL
}
Want
enum class LastFmImageSize {
@field:Json(name = "medium") MEDIUM,
@field:Json(name = "small") SMALL
}
hho
11/26/2018, 12:09 PMigor.wojda
11/26/2018, 12:16 PMdata class Album(
@field:Json(name = "abc") val artistName: String,
@field:Json(name = "cde") val albumTitle: String
)
enum class LastFmImageSize {
@field:Json(name = "medium")
MEDIUM,
@field:Json(name = "extralarge")
EXTRA_LARGE
}
We can argue that the data class has constructor with parameters while enum defines just a series of costs, however In practice, we would think about enum costs more like class constructor parameters them properties defined in the class (they are separated by comma after all)igor.wojda
11/26/2018, 12:19 PMAlexey Belkov [JB]
11/26/2018, 3:33 PM