Using this code :
import org.codehaus.jackson.map.ObjectMapper;
ObjectMapper objectMapper = new ObjectMapper();
String str = objectMapper.writeValueAsString(myObject);
I receive this Eclipse error:
The type org.codehaus.jackson.JsonGenerationException cannot be resolved. It is indirectly referenced from
required .class files
at line String str = objectMapper.writeValueAsString(myObject);
There are three 'JsonGenerationException' class types on my class path (you may have to save the image and open it separately to read the text in the image):
Is the reason I'm receiving this error message because JsonGenerationException is in two different jar files and Eclipse is unsure which on to use ? If so how can I fix it ?
I required this jar file : http://grepcode.com/snapshot/repo1.maven.org/maven2/org.codehaus.jackson/jackson-core-asl/1.9.4