原文链接:Jackson – Unmarshall to Collection/Array
1. Overview 概述
This tutorial will show how to deserialize a JSON Array to a Java Array or Collection with Jackson 2.
这篇将会介绍使用Jackson2如何反序列化JSON数组为Java数组或集合。
If you want to dig deeper and learn other cool things you can do with the Jackson 2 – head on over to the main Jackson tutorial.
如果想学习更多Jackson2的用法,可以点击 这里
2. Unmarshall to Array 拆解、反序列化JSON到数组
Jackson can easily deserialize to a Java Array:
Jackson能很轻易的反序列化JSON到Java数组,示例如下:
@Test
public void givenJsonArray_whenDeserializingAsArray_thenCorrect()
throws JsonPar