// return in JSON object list format
//[ { "id": "Dromas ardeola", "label": "Crab-Plover", "value":"Crab-Plover" },
out.print("[");
for (Iterator<ConceptWord> i = words.iterator(); i.hasNext();) {
ConceptWord w = i.next();
String ds = w.getConcept().getDisplayString();
out.print("{ \"value\":\"");
if (w.getConceptName().isPreferred()
|| w.getConceptName().getName().equalsIgnoreCase(ds)) {
out.print(WebUtil.escapeQuotes(w.getConceptName().getName()));
} else {
out.print(WebUtil.escapeQuotes(w.getConcept().getDisplayString()));
}
out.print("\",\"id\"");
out.print(":\"" + w.getConcept().getId());
out.print("\"}");
if (i.hasNext())
out.print(",");
}
out.print("]");