/** * Convert a list to JSON text. The result is a JSON array. If this list is * also a JSONAware, JSONAware specific behaviours will be omitted at this * top level. * * @see org.apache.chemistry.opencmis.commons.impl.json.JSONValue#toJSONString(Object) * * @param list * @return JSON text, or "null" if list is null. */ public static String toJSONString(List<Object> list) { if (list == null) { return "null"; } StringBuilder sb = new StringBuilder(1024); addJSONString(list, sb); return sb.toString(); }
/** * Convert a list to JSON text. The result is a JSON array. If this list is * also a JSONAware, JSONAware specific behaviours will be omitted at this * top level. * * @see org.apache.chemistry.opencmis.commons.impl.json.JSONValue#toJSONString(Object) * * @param list * @return JSON text, or "null" if list is null. */ public static String toJSONString(List<Object> list) { if (list == null) { return "null"; } StringBuilder sb = new StringBuilder(1024); addJSONString(list, sb); return sb.toString(); }
JSONArray.addJSONString((List<Object>) value, sb); return;
JSONArray.addJSONString((List<Object>) value, sb); return;