Skip to content

Commit

Permalink
tolerate missing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hofmeister committed Jun 7, 2011
1 parent 971af70 commit d733757
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private List<JSONObject> rows(final JSONObject json) throws JSONException {
final List<JSONObject> result = new ArrayList<JSONObject>(); final List<JSONObject> result = new ArrayList<JSONObject>();
final JSONArray rows = json.getJSONArray("rows"); final JSONArray rows = json.getJSONArray("rows");
for (int i = 0; i < rows.length(); i++) { for (int i = 0; i < rows.length(); i++) {
result.add(rows.getJSONObject(i).getJSONObject("doc")); result.add(rows.getJSONObject(i).optJSONObject("doc"));
} }
return result; return result;
} }
Expand Down

0 comments on commit d733757

Please sign in to comment.