"error" : "JsonParseException[Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@19d6816; line: 1, column: 0])\n at [Source: [B@19d6816; line: 2, column: 3]]"


(Ashok Gandla) #1

Hi
Getting the "error" : "JsonParseException[Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@19d6816; line: 1, column: 0])\n at [Source: [B@19d6816; line: 2, column: 3]]",
"status" : 500 error when i run below command
curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json

Can anyone help me?

Thanks in advance.


(Mark Walkom) #2

There's probably a problem with your data.


(Ashok Gandla) #3

It's a valid json.I already checked it..


(Christian Dahlqvist) #4

Can you please show the first few lines from the input?


(Ashok Gandla) #5

This is my json input:

{
"account_number": 0,
"balance": 16623,
"firstname": "Bradshaw",
"lastname": "Mckenzie",
"age": 29,
"gender": "F",
"address": "244 Columbus Place",
"employer": "Euron",
"email": "bradshawmckenzie@euron.com",
"city": "Hobucken",
"state": "CO"
}


(David Pilato) #6

It's a valid JSON not a valid bulk.


(Ashok Gandla) #7

Then how to execute this json? i mean what is the command?


(David Pilato) #8

PUT /index/type/id
{
your doc
}


(system) #9