Objectmapper: Really need help Objecting mapping enums

Created on 17 Apr 2016  路  3Comments  路  Source: tristanhimmelman/ObjectMapper

Hey guys. Thanks for the awesome library.

I am really stuck on how i should go about converting a JSON response to an enum.
Could you provide an example on this?

Most helpful comment

For the future traveler, above is a dead link. Here is an updated one

The skinny of it is that you must pass an EnumTransform<T> to your map
mimeType <- (map["mime_type"], EnumTransform<MimeType>())

All 3 comments

Thank you!.
Closing this.

For the future traveler, above is a dead link. Here is an updated one

The skinny of it is that you must pass an EnumTransform<T> to your map
mimeType <- (map["mime_type"], EnumTransform<MimeType>())

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nashirox picture nashirox  路  4Comments

VictorAlbertos picture VictorAlbertos  路  3Comments

amg1976 picture amg1976  路  3Comments

loryhuz picture loryhuz  路  4Comments

pcompassion picture pcompassion  路  3Comments