public static ArrayNode createArray(boolean fallbackToEmptyArray, JsonNode... nodes) {
		ArrayNode array = null;
		for (JsonNode element: nodes) {
			if (element != null) {
				if (array == null) {
					array = new ArrayNode(JsonNodeFactory.instance);
				}
				array.add(element);
			}
		}
		if ((array == null) && fallbackToEmptyArray) {
			array = new ArrayNode(JsonNodeFactory.instance);
		}
		return array;
	}
public static ArrayNode createArray ( boolean fallbackToEmptyArray , JsonNode ... nodes ) { ArrayNode array = null ; for ( JsonNode element : nodes ) { if ( element != null ) { if ( array == null ) { array = new ArrayNode ( JsonNodeFactory . instance ) ; } array . add ( element ) ; } } if ( ( array == null ) && fallbackToEmptyArray ) { array = new ArrayNode ( JsonNodeFactory . instance ) ; } return array ; }
Creates an ArrayNode from the given nodes. Returns an empty ArrayNode if no elements are provided and
fallbackToEmptyArray is true, null if false.