public static < T > T jsonMapToObject ( final Map < String , Object > map , final Class < T > valueType , final ObjectMapper objectMapper ) throws IOException { if ( map == null ) { return null ; } Validate . notNull ( valueType , "valueType must not be null" ) ; if ( objectMapper == null ) { return DEFAULT_OBJECT_MAPPER . readValue ( DEFAULT_OBJECT_MAPPER . writeValueAsBytes ( map ) , valueType ) ; } return objectMapper . readValue ( objectMapper . writeValueAsBytes ( map ) , valueType ) ; }
Transforms a JSON map into an object .