# Error while importing json file

**URL:** <https://discuss.elastic.co/t/error-while-importing-json-file/192374>\
**Category:** Elasticsearch\
**Created:** [July 26, 2019, 7:19am UTC](https://discuss.elastic.co/t/error-while-importing-json-file/192374 "2019-07-26T07:19:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pharshil9697](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@pharshil9697](https://discuss.elastic.co/u/pharshil9697)\
**Post date:** [July 26, 2019, 7:19am UTC](https://discuss.elastic.co/t/error-while-importing-json-file/192374/1 "2019-07-26T07:19:25Z")

</div>

I created one index and then tried to import a json file. But it displays a parsing error.  
Elasticsearch 7.2.0  
POST accounts/acc  
{  
"mappings": {  
"_default_": {  
"properties": {  
"account\_number": {  
"type": "integer"  
},  
"balance": {  
"type": "integer",  
"index": "not\_analyzed"  
},  
"firstname": {  
"type": "string"  
},  
"age": {  
"type": "integer"  
}  
}  
}  
}  
}

PUT accounts/acc/\_bulk --data-binary @accounts.json

The json file is : [https://github.com/elastic/elasticsearch/blob/master/docs/src/test/resources/accounts.json](https://github.com/elastic/elasticsearch/blob/master/docs/src/test/resources/accounts.json)

error log is:  
{  
"error": {  
"root\_cause": [  
{  
"type": "json\_parse\_exception",  
"reason": "Unrecognized token 'PUT': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@8f68b4c; line: 1, column: 5]"  
}  
],  
"type": "json\_parse\_exception",  
"reason": "Unrecognized token 'PUT': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@8f68b4c; line: 1, column: 5]"  
},  
"status": 500  
}

---

<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:** [August 23, 2019, 7:23am UTC](https://discuss.elastic.co/t/error-while-importing-json-file/192374/2 "2019-08-23T07:23:10Z")

</div>

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