Skip to content

Commit

Permalink
better handle Mongo Documents
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavis95 committed Jul 21, 2017
1 parent b815ac8 commit a37794d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ private void appendDocument(List<String> fields, StringBuilder responseBuilder,
responseBuilder.append((item));

}
else if (o instanceof Document) {
responseBuilder.append(JSONSerializers.getLegacy().serialize(o));
}
else {
responseBuilder.append(o.toString());
}
Expand All @@ -659,6 +662,9 @@ else if (obj instanceof Boolean) {
Boolean value = (Boolean) obj;
responseBuilder.append(value);
}
else if (obj instanceof Document) {
responseBuilder.append(JSONSerializers.getLegacy().serialize(obj));
}
else {
String value = (String) obj;
if (value.contains(",") || value.contains(" ") || value.contains("\"") || value.contains("\n")) {
Expand Down

0 comments on commit a37794d

Please sign in to comment.