in freemarker-docgen-core/src/main/java/org/freemarker/docgen/core/CJSONInterpreter.java [547:584]
private List<Object> fetchListInner(
List<Object> list, char terminator, boolean forceStringValues)
throws EvaluationException {
int listP = p - 1;
skipWS();
if (terminator == 0x20) {
listP = p;
}
while (true) {
char c;
if (p < ln) {
c = tx.charAt(p);
if (c == terminator) {
return list;
}
if (c == ',') {
throw newSyntaxError(
"List item is missing before the comma.");
}
} else {
if (terminator == 0x20) {
return list;
} else {
throw newSyntaxError("Reached the end of the text, "
+ "but the list was not closed with "
+ TextUtil.jQuoteOrName(terminator) + ".",
listP);
}
}
list.add(fetchExpression(forceStringValues, false));
c = skipSeparator(
terminator, null, "This is a list, and not a map.");
if (c == terminator) {
return list;
}
}
}