spring-geode/src/main/java/org/springframework/geode/data/json/converter/AbstractObjectArrayToJsonConverter.java
/**
	 * Converts the given {@link Iterable} of {@link Object Objects} into a {@link String JSON} array.
	 *
	 * @param iterable {@link Iterable} containing the {@link Object Objects} to convert into {@link String JSON};
	 * must not be {@literal null}.
	 * @return the {@link String JSON} generated from the given {@link Iterable} of {@link Object Objects};
	 * never {@literal null}.
	 * @throws IllegalArgumentException if {@link Iterable} is {@literal null}.
	 * @see #getObjectToJsonConverter()
	 * @see java.lang.Iterable
	 */
Converts the given  Iterable of  Object Objects into a  String JSON array.
@param iterable  Iterable containing the  Object Objects to convert into  String JSON;
must not be  null.
@return the  String JSON generated from the given  Iterable of  Object Objects;
never  null.
@throws IllegalArgumentException if  Iterable is  null.
Converts the given Iterable of Object Objects into a String JSON array . @param iterable Iterable containing the Object Objects to convert into String JSON ; must not be null . @return the String JSON generated from the given Iterable of Object Objects ; never null . @throws IllegalArgumentException if Iterable is null .
@Override
	public @NonNull String convert(@NonNull Iterable<?> iterable) {
		Assert.notNull(iterable, "Iterable must not be null");
		StringBuilder json = new StringBuilder(BEGIN_ARRAY);
		ObjectToJsonConverter converter = getObjectToJsonConverter();
		boolean addComma = false;
		for (Object value : CollectionUtils.nullSafeIterable(iterable)) {
			json.append(addComma ? JSON_OBJECT_SEPARATOR : EMPTY_STRING);
			json.append(converter.convert(value));
			addComma = true;
		}
		json.append(END_ARRAY);
		return json.toString();
	}
@ Override public @ NonNull String convert ( @ NonNull Iterable < ? > iterable ) { Assert . notNull ( iterable , "Iterable must not be null" ) ; StringBuilder json = new StringBuilder ( BEGIN_ARRAY ) ; ObjectToJsonConverter converter = getObjectToJsonConverter ( ) ; boolean addComma = false ; for ( Object value : CollectionUtils . nullSafeIterable ( iterable ) ) { json . append ( addComma ? JSON_OBJECT_SEPARATOR : EMPTY_STRING ) ; json . append ( converter . convert ( value ) ) ; addComma = true ; } json . append ( END_ARRAY ) ; return json . toString ( ) ; }
Converts the given {@link Iterable} of {@link Object Objects} into a {@link String JSON} array.
Converts the given { @link Iterable } of { @link Object Objects } into a { @link String JSON } array .