code: public static <T> void addArrayIfNotNull(JSONWriter writer, String field,
  			Collection<T> items, JsonObjectWriter<T> objWriter)
  			throws JSONException {
  		if (items == null)
  			return;
  		addCollection(writer, field, items, objWriter);
  	}
docs: Adds a list.
  
  @param writer
  used writer.
  @param field
  field to write.
  @param items
  used items.
  @param objWriter
  single object writer.