且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Jackson从String反序列化ArrayList

更新时间:2022-06-05 17:09:05

退房本文描述了如何使用jackson objectMapper的功能来实现这一目标。

Check out this article describing how to use the features of the jackson objectMapper to accomplish this.

https:/ /github.com/FasterXML/jackson-dataformat-xml/issues/21

对我来说,添加以下内容解决了这个问题

For me adding the following solved this issue

jsonMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);