cannot find symbol setObjectMapper in class Unirest
See original GitHub issuewhile trying to set the object mapper for Unirest using ` Unirest.setObjectMapper(new ObjectMapper() { private com.fasterxml.jackson.databind.ObjectMapper jacksonObjectMapper = new com.fasterxml.jackson.databind.ObjectMapper();
public <T> T readValue(String value, Class<T> valueType) {
try {
return jacksonObjectMapper.readValue(value, valueType);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public String writeValue(Object value) {
try {
return jacksonObjectMapper.writeValueAsString(value);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}
});
`
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Mashape Unirest Java : java.lang.NoClassDefFoundError
I did Maven Install by right clicking pom.xml and it generates a folder named target contains set of files with snapshot.jar file. You...
Read more >A Guide to Unirest - Baeldung
Discover Unirest - a lightweight HTTP client library. ... Get started with Spring 5 and Spring Boot 2, through the Learn Spring course:....
Read more >Unirest in Java: Simplified, lightweight HTTP client library.
For this you need to provide the Unirest configuration with a implementation of ObjectMapper (see Object Mappers for details.). If the response is...
Read more >Kong/unirest-java - Gitter
I can't get deserialization to work using the ObjectMapper example on the home ... ObjectMapper has signature readValue(String, Class<T>) while Unirest only ...
Read more >com.mashape.unirest.request.HttpRequestWithBody.body ...
Can't find an ObjectMapper implementation."); } return body(objectMapper.writeValue(body)); }. origin: com.mashape.unirest/unirest-java ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ryber thank you very much for your feedback, I finally have a solution, yes you were right the version I was using was well out of date.
My gradle dependencies are now: -
My configuration class does this…
My controller class can now use Unirest with Java Classes
Works a treat, very happy with the results.
try using a modern version. Note that we changed groupId and everything