# How to import json file to Elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-import-json-file-to-elasticsearch/210976>\
**Category:** Elasticsearch\
**Created:** [December 7, 2019, 5:52pm UTC](https://discuss.elastic.co/t/how-to-import-json-file-to-elasticsearch/210976 "2019-12-07T17:52:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Ahmet\_Kartal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmet_kartal/32/47196_2.png) [@Ahmet\_Kartal](https://discuss.elastic.co/u/Ahmet_Kartal)\
**Post date:** [December 8, 2019, 7:04am UTC](https://discuss.elastic.co/t/how-to-import-json-file-to-elasticsearch/210976/3 "2019-12-08T07:04:38Z")

</div>

> [@dadoonet](#):
>
> Any details about what did not work?

I just typed that cURL command and it did not send data to my localhost:9200. It returned null line.

> [@dadoonet](#):
>
> Do you have one line per JSon?

Each json seperated from each other by new line.For example like this:

```
{"type": "server", "timestamp": "2019-12-07T19:09:46,351Z", "level": "INFO", "component": "o.e.e.NodeEnvironment", "cluster.name": "docker-cluster", "node.name": "f97588749c79", "message": "heap size [989.8mb], compressed ordinary object pointers [true]" }
{"type": "server", "timestamp": "2019-12-07T19:09:46,353Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "f97588749c79", "message": "node name [f97588749c79], node ID [qJbs-xKRTxiaoIGXbrsVkg], cluster name [docker-cluster]" }

```

---

_[View the full topic](https://discuss.elastic.co/t/how-to-import-json-file-to-elasticsearch/210976)._
