Mongojack cannot deserialize empty string to ArrayList

22 views
Skip to first unread message

Ming Luo

unread,
Mar 10, 2016, 6:12:30 PM3/10/16
to mongo-jackson-mapper
I have a class with member: public List<Tag> tags; I want to fill the class from JacksonDB. If the tags in MongoDB is not empty, no problem, but if it's empty, I will get the following exception: Can not instantiate value of type [collection type; class java.util.ArrayList, contains [simple type, class com.dropwizard.representations.Tag]] from String value; no single-String constructor/factory method, because it cannot construct an ArrayList with an empty string. Can anyone help me on this? Thanks!
Reply all
Reply to author
Forward
0 new messages