changed writeObject to writeArray

dealing with json array not json map
This commit is contained in:
Aaron Sutter 2011-11-23 16:38:35 -08:00 committed by Shay Banon
parent 2c0662e18e
commit 8a5f767286
1 changed files with 4 additions and 2 deletions

View File

@ -353,11 +353,13 @@ public class CouchdbRiver extends AbstractRiverComponent implements River {
// bigcouch uses array for the seq
try {
XContentBuilder builder = XContentFactory.jsonBuilder();
builder.startObject();
//builder.startObject();
builder.startArray();
for (Object value : ((List) lastSeq)) {
builder.value(value);
}
builder.endObject();
builder.endArray();
//builder.endObject();
lastSeqAsString = builder.string();
} catch (Exception e) {
logger.error("failed to convert last_seq to a json string", e);