# Simple bulk insert (Index) not working...need help

**URL:** https://discuss.elastic.co/t/simple-bulk-insert-index-not-working-need-help/121973
**Category:** Kibana
**Created:** [March 1, 2018, 3:05am UTC](https://discuss.elastic.co/t/simple-bulk-insert-index-not-working-need-help/121973 "2018-03-01T03:05:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jason\_smith](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jason\_smith](https://discuss.elastic.co/u/jason_smith)
#### Post date: [March 1, 2018, 3:05am UTC](https://discuss.elastic.co/t/simple-bulk-insert-index-not-working-need-help/121973/1 "2018-03-01T03:05:51Z")

</div>

```
   First day at ELK stack. I am trying to Index 3 documents into Elasticsearch using Kibana. I got this from Kibana official site training video. I keep getting "type": "json_e_o_f_exception".

```

I doesn't throw any syntactical errors. But when I click on green button to execute I get that error.

Any suggestions please?  
POST /inspections/report/\_bulk  
{  
"index": {  
"\_id": 1  
}  
}  
{  
"business\_address": "600 california street",  
"business\_city": "San francisco",  
"business \_id": "2228",  
"business\_location": {  
"type": "Point",  
"coordinates": [  
-122.40,  
37.8988   
]  
},  
"business\_name": "Tokyo Express",  
"business\_Postal": "94108",  
"Inspection\_id": "2228",  
"inspection\_type":"Routine",  
"inspection\_score": 96,  
"risk\_categoy":"Low Risk",  
"violation\_description": "Unclean nonfood contact",  
"violation\_id": 01

```
  }
  {
        "index": {
         "_id": 2
   }
 }
 {
"business_address": "600 california street",
"business_city": "San francisco",
"business _id": "2229",
"business_location": {
	"type": "Point",
	"coordinates": [
		-122.40,
		37.8988			
	]
},
"business_name": "bazar Express",
"business_Postal": "94108",
"Inspection_id": "2228",
"inspection_type":"Routine",
"inspection_score": 97,
"risk_categoy":"Low Risk",
"violation_description": "Unclean nonfood ffffff contact",
"violation_id": 02

 }
```

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [March 1, 2018, 7:40pm UTC](https://discuss.elastic.co/t/simple-bulk-insert-index-not-working-need-help/121973/2 "2018-03-01T19:40:40Z")

</div>

The error message is not ideal, but it's saying the JSON parser found an end before it expected to. The problem is the JSON you're trying to use is invalid. Specifically, the `violation_id` value isn't valid, if you want to keep the leading 0, quote the value. 01 and 02 are not valid numbers in JSON.

---

<div class="post-metadata">

### Author: ![jason\_smith](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jason\_smith](https://discuss.elastic.co/u/jason_smith)
#### Post date: [March 3, 2018, 10:49pm UTC](https://discuss.elastic.co/t/simple-bulk-insert-index-not-working-need-help/121973/3 "2018-03-03T22:49:34Z")

</div>

Thank You so much

---

<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: [March 31, 2018, 10:49pm UTC](https://discuss.elastic.co/t/simple-bulk-insert-index-not-working-need-help/121973/4 "2018-03-31T22:49:41Z")

</div>

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