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

nearspears picture nearspears  路  4Comments

nashirox picture nashirox  路  4Comments

delbyze picture delbyze  路  3Comments

liltimtim picture liltimtim  路  3Comments

danyalaytekin picture danyalaytekin  路  4Comments