# Noob) Put json file on elastic, there is an error

**URL:** <https://discuss.elastic.co/t/noob-put-json-file-on-elastic-there-is-an-error/146656>\
**Category:** Elasticsearch\
**Created:** [August 30, 2018, 9:11am UTC](https://discuss.elastic.co/t/noob-put-json-file-on-elastic-there-is-an-error/146656 "2018-08-30T09:11:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![da02d4d6e86247f19849](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@da02d4d6e86247f19849](https://discuss.elastic.co/u/da02d4d6e86247f19849)\
**Post date:** [August 30, 2018, 9:11am UTC](https://discuss.elastic.co/t/noob-put-json-file-on-elastic-there-is-an-error/146656/1 "2018-08-30T09:11:03Z")

</div>

my json file is here, [https://drive.google.com/open?id=1e8zkXX5zyIgIgPb0amwsPE0lnXWu0KHh](https://drive.google.com/open?id=1e8zkXX5zyIgIgPb0amwsPE0lnXWu0KHh)

and i try put it on my elasticsearch with  
curl -H 'Content-type: application/json' -XPOST 'localhost:9200:news/new -d @/home/sang/Downloads/elasticsearch-6.3.2/fast.json

 ![1](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d5c4aad27946415511922fc5fc1613e8c053fcc8.png)

but as you can see, there is error  
not\_x\_content\_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes

how can i solve it??

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [September 7, 2018, 9:11am UTC](https://discuss.elastic.co/t/noob-put-json-file-on-elastic-there-is-an-error/146656/2 "2018-09-07T09:11:26Z")

</div>

This doesn't look like valid json. First of all, it starts with a `[`. Check your file e.g. with [https://jsonlint.com/](https://jsonlint.com/) that it is valid first. Second: you seem to try to put several documents at once. This is only possible using the `_bulk` endpoint, which follows a [specific bulk format](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html).

---

<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:** [October 5, 2018, 9:11am UTC](https://discuss.elastic.co/t/noob-put-json-file-on-elastic-there-is-an-error/146656/3 "2018-10-05T09:11:28Z")

</div>

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