Java introspection: object to map

Another way to user JacksonObjectMapper is the convertValue ex:

 ObjectMapper m = new ObjectMapper();
 Map<String,Object> mappedObject = m.convertValue(myObject, new TypeReference<Map<String, String>>() {});

Leave a Comment