private List<Object> visitArrayNode(final JsonNode rootNode,
      final ObjectInspector oi) throws SerDeException {
    Preconditions.checkArgument(JsonNodeType.ARRAY == rootNode.getNodeType());

    final ObjectInspector loi =
        ((ListObjectInspector) oi).getListElementObjectInspector();

    final List<Object> ret = new ArrayList<>(rootNode.size());
    final Iterator<JsonNode> it = rootNode.elements();

    while (it.hasNext()) {
      final JsonNode element = it.next();
      ret.add(visitNode(element, loi));
    }

    return ret;
  }
Visit a node if it is expected to be a JSON Array data type (a.k.a. Hive
Array type)

@param rootNode The node pointing at the JSON object
@param oi The ObjectInspector to parse the List (must be a
         ListObjectInspector)
@return A Java List of Objects, each element is an element of the array
@throws SerDeException The SerDe is not configured correctly
serde/src/java/org/apache/hadoop/hive/serde2/json/HiveJsonReader.java