I am mapping the linkedHashMap to my Custom Pojo class using the below code.
ObjectMapper mapper = new ObjectMapper();**mapper.registerModule(new ParameterNamesModule()).registerModule(new Jdk8Module()).registerModule(new JavaTimeModule());** mapper.findAndRegisterModules(); mapper.convertValue(wrapper.getObject(), wrapper.getClassType());
This is giving me the below exception "com.fasterxml.jackson.databind.JsonMappingException: Expected type float, integer, or string."
Previously, It was giving me a different exception(com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of java.time.Instant: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)) and after adding the highlighted code to the mapper then it started giving this exception. Could anyone help me figure out how to solve this exception?