if (inputList != null) {
for (int i = 0; i < inputList.size(); i++) {
try {
resultList.add(new JsonWrapper(context + "." + key + "[" + i + "]", inputList.get(i)));
} catch (ClassCastException e) {
throw new JsonException("Expected " + context + "." + key + "[" + i + "] to be JSONObject but it is not");
}
}
}
return resultList;