Example #1
0
 @SuppressWarnings("unchecked")
 static List<Object> convertList(List<?> list) {
   List<Object> arr = new ArrayList<>(list.size());
   for (Object obj : list) {
     if (obj instanceof Map) {
       arr.add(JsonObject.convertMap((Map<String, Object>) obj));
     } else if (obj instanceof JsonObject) {
       arr.add(((JsonObject) obj).toMap());
     } else if (obj instanceof List) {
       arr.add(convertList((List<?>) obj));
     } else {
       arr.add(obj);
     }
   }
   return arr;
 }
Example #2
0
 public int size() {
   return list.size();
 }