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

jperera84 picture jperera84  路  4Comments

Dbigshooter picture Dbigshooter  路  4Comments

borut-t picture borut-t  路  4Comments

nashirox picture nashirox  路  4Comments

maksTheAwesome picture maksTheAwesome  路  4Comments