# Malformed content, found extra data after parsing: START\_OBJECT

**URL:** <https://discuss.elastic.co/t/malformed-content-found-extra-data-after-parsing-start-object/65376>\
**Category:** Elasticsearch\
**Created:** [November 8, 2016, 4:16pm UTC](https://discuss.elastic.co/t/malformed-content-found-extra-data-after-parsing-start-object/65376 "2016-11-08T16:16:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linuxdev](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@linuxdev](https://discuss.elastic.co/u/linuxdev)\
**Post date:** [November 8, 2016, 4:16pm UTC](https://discuss.elastic.co/t/malformed-content-found-extra-data-after-parsing-start-object/65376/1 "2016-11-08T16:16:18Z")

</div>

Im testing elasticsearch and trying to inject a json file.  
For some reason I get "Malformed content, found extra data after parsing: START\_OBJECT" error.

Example query:

```auto
curl -XPOST 'http://mwdev:9200/test/test/1' -d @test.json

```

Example content:

```auto
{"timestamp":"2016-11-03T01:34:01-04:00","word":"faithful","is_mwu":"no","host":"ws1","ref":"dictionary"}
{"timestamp":"2016-11-03T01:34:02-04:00","word":"drown","is_mwu":"no","host":"ws1","ref":"thesaurus"}
{"timestamp":"2016-11-03T01:34:02-04:00","word":"biggest","is_mwu":"no","host":"ws1","ref":"thesaurus"}
{"timestamp":"2016-11-03T01:34:02-04:00","word":"misconduct","is_mwu":"no","host":"ws1","ref":"thesaurus"}
{"timestamp":"2016-11-03T01:34:03-04:00","word":"transaction","is_mwu":"no","host":"ws1","ref":"dictionary"}
{"timestamp":"2016-11-03T01:34:03-04:00","word":"Pithecus","is_mwu":"no","host":"ws1","ref":"dictionary"}

```

Any idea why this happens?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 8, 2016, 4:24pm UTC](https://discuss.elastic.co/t/malformed-content-found-extra-data-after-parsing-start-object/65376/2 "2016-11-08T16:24:44Z")

</div>

That file contain more than one JSON record, which can not be indexed as a single document. If you want to index multiple records in a single request you need to format your file and use the [bulk API](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/docs-bulk.html#docs-bulk).

---

<div class="post-metadata">

**Author:** ![linuxdev](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@linuxdev](https://discuss.elastic.co/u/linuxdev)\
**Post date:** [November 8, 2016, 4:38pm UTC](https://discuss.elastic.co/t/malformed-content-found-extra-data-after-parsing-start-object/65376/3 "2016-11-08T16:38:35Z")

</div>

ah I see. thx

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 6, 2016, 4:38pm UTC](https://discuss.elastic.co/t/malformed-content-found-extra-data-after-parsing-start-object/65376/4 "2016-12-06T16:38:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
