# Json upload using Data visualizer issue

**URL:** <https://discuss.elastic.co/t/json-upload-using-data-visualizer-issue/259763>\
**Category:** Kibana\
**Created:** [December 28, 2020, 11:40pm UTC](https://discuss.elastic.co/t/json-upload-using-data-visualizer-issue/259763 "2020-12-28T23:40:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Savita\_Chauhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/savita_chauhan/32/76864_2.png) [@Savita\_Chauhan](https://discuss.elastic.co/u/Savita_Chauhan)\
**Post date:** [December 28, 2020, 11:40pm UTC](https://discuss.elastic.co/t/json-upload-using-data-visualizer-issue/259763/1 "2020-12-28T23:40:11Z")

</div>

I am trying to upload/index a simple json file using Kibana's Data Visualizer (under ML). I have 3 node elastic cluster and one kibana running on docker. It lets me upload the json, but when I look at the index it had put all my fields under @timestamp, field, message (all my fields go here). I haven't been able to figure out how to upload the json file correctly.  
For eg, this is how my json got indexed:  
(barcode, upload\_time, dev\_id, etc are all separate fields in my json, but it put all of them under message. I don't get what I did wrong)  
`{ "_index": "temperature1", "_type": "_doc", "_id": "0mqepnYBI_PmrchLebAL", "_score": 1.0, "_source": { "@timestamp": "2020-11-25T03:59:01.868674000Z", "field": "\"upload_time\"", "message": " \"upload_time\": \"2020-11-25T03:59:01.868674Z\"\r\n },\r\n {\r\n \"device_id\": \"xxxx\",\r\n \"device_data\": {\r\n \"ta\": \"26.51\",\r\n \"to\": \"35.79\",\r\n \"dev_id\": \"xxxx\",\r\n \"barcode\": \"164378\",\r\n \"file_name\": \"\",\r\n \"User-Agent\": \"rrrrr\"," } }`

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 29, 2020, 12:22am UTC](https://discuss.elastic.co/t/json-upload-using-data-visualizer-issue/259763/2 "2020-12-29T00:22:56Z")

</div>

```auto
{
  "_index": "temperature1",
  "_type": "_doc",
  "_id": "0mqepnYBI_PmrchLebAL",
  "_score": 1,
  "_source": {
    "@timestamp": "2020-11-25T03:59:01.868674000Z",
    "field": "\"upload_time\"",
    "message": """ "upload_time": "2020-11-25T03:59:01.868674Z"
 },
 {
 "device_id": "xxxx",
 "device_data": {
 "ta": "26.51",
 "to": "35.79",
 "dev_id": "xxxx",
 "barcode": "164378",
 "file_name": "",
 "User-Agent": "rrrrr","""
  }
}

```

Your message has a `"""` which means multi line and the closing to that ins't until after `User-Agent`. What are you using to generate this data?

I believe you are going for the below structure.

```auto
{
    "_index": "temperature1",
    "_type": "_doc",
    "_id": "0mqepnYBI_PmrchLebAL",
    "_score": 1,
    "_source": {
        "@timestamp": "2020-11-25T03:59:01.868674000Z",
        "field": "\"upload_time\"",
        "message": "",
        "upload_time": "2020-11-25T03:59:01.868674Z",
        "device_id": "xxxx",
        "device_data": {
            "ta": "26.51",
            "to": "35.79",
            "dev_id": "xxxx",
            "barcode": "164378",
            "file_name": "",
            "User-Agent": "rrrrr"
        }
    }
}

```

---

<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:** [January 26, 2021, 12:23am UTC](https://discuss.elastic.co/t/json-upload-using-data-visualizer-issue/259763/3 "2021-01-26T00:23:05Z")

</div>

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