title: Parsing of JSON from Kafka to Elasticsearch
body: <p>I am trying to pass a document of JSON arrays from Kafka to elasticsearch. My JSON data looks like this:</p>
  
  <pre><code>{
    "A": "---",
    "B": "---",
    "C": "---",
    "D": "---",
    "ABC": "---"
  }
  </code></pre>
  
  <p>Due to some reason, Kafka is not able to parse this doc and I am getting an error as:</p>
  
  <pre><code>org.codehaus.jackson.JsonParseException: Unexpected close marker '}': expected ']' (for ROOT starting at [Source: [B@7563b995; line: 1, column: 0])
  at [Source: [B@7563b995; line: 1, column: 3]
  at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433)
  at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521)
  at org.codehaus.jackson.impl.JsonParserBase._reportMismatchedEndMarker(JsonParserBase.java:487)
  at org.codehaus.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:473)
  at org.codehaus.jackson.map.ObjectReader._initForReading(ObjectReader.java:828)
  at org.codehaus.jackson.map.ObjectReader._bindAndClose(ObjectReader.java:752)
  at org.codehaus.jackson.map.ObjectReader.readValue(ObjectReader.java:473)
  at org.elasticsearch.river.kafka.IndexDocumentProducer.addMessagesToBulkProcessor(IndexDocumentProducer.java:71)
  at org.elasticsearch.river.kafka.KafkaWorker.consumeMessagesAndAddToBulkProcessor(KafkaWorker.java:107)
  at org.elasticsearch.river.kafka.KafkaWorker.run(KafkaWorker.java:78)
  at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>It works fine if my data is of the format:</p>
  
  <pre><code>{"A": "---", "B": "---", "C": "---", "D": "---", "ABC": "---"}
  </code></pre>
  
  <p>I have several elements that I want to pass as an array in the document. Any idea why I am getting the error for the first format of JSON data? Thanks</p>