Forum Discussion
andrew_holbrook
8 years agoNew Contributor III
Thanks @dmiller and @robin for this! I was having a similar issue with some of my custom snaps.
@robin what do you import at the top? Right now I’m importing from: org.codehaus.jackson.map.ObjectMapper
Thanks!
Andrew
robin
8 years agoFormer Employee
import com.fasterxml.jackson.databind.ObjectMapper;
The org.codehaus.jackson
-package version is from an older version of Jackson. The com.fasterxml.jackson
-package version is the right one. See java - org.codehaus.jackson versus com.fasterxml.jackson.core - Stack Overflow for more.
The implementation that is injected is SnapObjectMapper
, which extends com.fasterxml.jackson.databind.ObjectMapper
. It enables some Jackson serialization features by default, as well as some custom serializers for Dates/Times/DateTimes.