Posts

Showing posts with the label jackson

RESTful API + POST + json body

Library :        <dependency>             <groupId>com.fasterxml.jackson.core</groupId>             <artifactId>jackson-databind</artifactId>             <version>2.7.2</version>         </dependency> Mapper Class public class MapperUtil {     private final static ObjectMapper mapper = new ObjectMapper();     public static <T> T readAsObjectOf(Class<T> clazz, String value) {         try {             return mapper.readValue(value, clazz);         } catch (IOException e) {             logger.error(e.getMessage());      ...