title: Elastic search bulk api - Unexpected end-of-input: expected close marker for Object error
body: <p>I am trying to upload a json data into elastic search api and trying using curl command, but when i try, getting this kind of error.</p>
  <p>Error reason</p>
  <pre><code>&quot;reason&quot;: &quot;Unexpected end-of-input: expected close marker for Object (start marker at [Source: (org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper); line: 1, column: 1])\n at [Source: (org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper); line: 2, column: 1]&quot;
  </code></pre>
  <p>Command:</p>
  <pre><code>curl -XPOST -u dev-user:dev-user-password domain-endpoint/_bulk https://search-****.us-west-2.es.amazonaws.com/_bulk --data-binary @sample.json -H &quot;Content-Type: application/json&quot;
  </code></pre>
  <p>sample.json</p>
  <pre><code>{ &quot;index&quot;: {&quot;_index&quot;: &quot;products&quot;, &quot;_type&quot;: &quot;product&quot;, &quot;_id&quot;: 1} }
  { &quot;title&quot;: &quot;Product A&quot;,&quot;description&quot;: &quot;Brand A - Product A - 1.5 kg&quot;,&quot;price&quot;: 3.49,&quot;sku&quot;: &quot;wi208564&quot;,&quot;supermarket&quot;: &quot;AJ&quot;,&quot;categories&quot;: &quot;Fruit AJ&quot;,&quot;product_type&quot;: &quot;Sinaasappels - mandarijnen&quot;,&quot;brand&quot;: &quot;Brand A\n&quot;}
  { &quot;index&quot;: {&quot;_index&quot;: &quot;products&quot;, &quot;_type&quot;: &quot;product&quot;, &quot;_id&quot;: 2} }
  { &quot;title&quot;: &quot;Product B&quot;,&quot;description&quot;: &quot;Brand B - Product B - 1 kg&quot;,&quot;price&quot;: 2.49,&quot;sku&quot;: &quot;wi308564&quot;,&quot;supermarket&quot;: &quot;AJ&quot;,&quot;categories&quot;: &quot;Fruit AJ&quot;,&quot;product_type&quot;: &quot;Sinaasappels - mandarijnen&quot;,&quot;brand&quot;: &quot;Brand B\n&quot;}
  </code></pre>
  <p>I tried the solution posted here, <a href="https://stackoverflow.com/questions/29457887/elasticsearch-bulk-api-unexpected-end-of-input-expected-close-marker-for-arra">Elasticsearch Bulk API - Unexpected end-of-input: expected close marker for ARRAY</a> but still getting the same error.
  Any help would be really appreciated.</p>