# I'm having trouble uploading my json data

**URL:** <https://discuss.elastic.co/t/im-having-trouble-uploading-my-json-data/316573>\
**Category:** Elasticsearch\
**Created:** [October 13, 2022, 7:47pm UTC](https://discuss.elastic.co/t/im-having-trouble-uploading-my-json-data/316573 "2022-10-13T19:47:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vitoria\_De\_Lara](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vitoria_de_lara/32/102210_2.png) [@Vitoria\_De\_Lara](https://discuss.elastic.co/u/Vitoria_De_Lara)\
**Post date:** [October 13, 2022, 7:47pm UTC](https://discuss.elastic.co/t/im-having-trouble-uploading-my-json-data/316573/1 "2022-10-13T19:47:08Z")

</div>

I'm using centos8 and I have this file:  
`file2\_oneline1.json  
inside him:

{"index":{"\_index":"accounts","\_type":"type1","\_id":"7"}}{"nome":"rafaela","idade":"70","cidade":"BH"}{"nome":"vitoria","idade":"20","cidade":"SP"}  
`

meu erro : {  
"took" : 1,  
"errors" : true,  
"items" : [  
{  
"index" : {  
"\_index" : "accounts",  
"\_type" : "type1",  
"\_id" : "8",  
"status" : 400,  
"error" : {  
"type" : "mapper\_parsing\_exception",  
"reason" : "failed to parse, document is empty"  
}  
}  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 13, 2022, 9:44pm UTC](https://discuss.elastic.co/t/im-having-trouble-uploading-my-json-data/316573/2 "2022-10-13T21:44:56Z")

</div>

In the future please format your code using the `</>` button

> [@Vitoria\_De\_Lara](#):
>
> {"index":{"\_index":"accounts","\_type":"type1","\_id":"7"}}

The only valid value for `_type` is `_doc`

`{"index":{"_index":"accounts","_type":"_doc","_id":"7"}}`

Or leave it out...

Types were removed in Version 7.

I would also review this if that is how you are trying to upload your data

> **[Bulk API | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html)**

---

<div class="post-metadata">

**Author:** ![rachel\_gomez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rachel_gomez/32/108615_2.png) [@rachel\_gomez](https://discuss.elastic.co/u/rachel_gomez)\
**Post date:** [October 14, 2022, 6:06am UTC](https://discuss.elastic.co/t/im-having-trouble-uploading-my-json-data/316573/3 "2022-10-14T06:06:15Z")

</div>

Ways To Fix ‘Updating Failed. The Response is Not a Valid JSON Response’ Error

Check the URL Settings of the WordPress Site  
Fix the WordPress Permalink Structure  
Regenerate WordPress .htaccess File  
Check the Themes and Plugins  
Use Classic Editor  
Check the Site Health  
Disable the Security Firewall  
Use Debugging in WordPress  
Upload Media Files Through the Media Library  
Look for Expert Help

Regards,  
Rachel Gomez

---

<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:** [November 11, 2022, 6:06am UTC](https://discuss.elastic.co/t/im-having-trouble-uploading-my-json-data/316573/4 "2022-11-11T06:06:47Z")

</div>

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