Expected: OBJECT_START but got ARRAY_START at [16]
up vote
3
down vote
favorite
How to add multiple JSON documents through the Solr Admin Documents page?
I tried with json:
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad",
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai",
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi",
]
After click Submit Document, it returns errors:
Status: error
Error: Bad Request
"msg": "Expected: OBJECT_START but got ARRAY_START at [16]",
"code": 400
json ubuntu solr
add a comment |
up vote
3
down vote
favorite
How to add multiple JSON documents through the Solr Admin Documents page?
I tried with json:
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad",
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai",
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi",
]
After click Submit Document, it returns errors:
Status: error
Error: Bad Request
"msg": "Expected: OBJECT_START but got ARRAY_START at [16]",
"code": 400
json ubuntu solr
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
How to add multiple JSON documents through the Solr Admin Documents page?
I tried with json:
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad",
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai",
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi",
]
After click Submit Document, it returns errors:
Status: error
Error: Bad Request
"msg": "Expected: OBJECT_START but got ARRAY_START at [16]",
"code": 400
json ubuntu solr
How to add multiple JSON documents through the Solr Admin Documents page?
I tried with json:
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad",
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai",
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi",
]
After click Submit Document, it returns errors:
Status: error
Error: Bad Request
"msg": "Expected: OBJECT_START but got ARRAY_START at [16]",
"code": 400
json ubuntu solr
json ubuntu solr
edited Apr 4 '17 at 6:03
Toywo
2,209101824
2,209101824
asked Apr 4 '17 at 3:27
Ken Nguyen
90110
90110
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
up vote
2
down vote
Remove the [ ] bracket, this works for me.
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
add a comment |
up vote
0
down vote
Try to remove , before } symbol like follows
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
]
You can check json format in this link also https://jsonformatter.curiousconcept.com/
I just try and it still returns same errors Bad Request with msg: Expected: OBJECT_START but got ARRAY_START at [16]
– Ken Nguyen
Apr 4 '17 at 3:51
try to use instead of [ and instead of ]
– selvarajmas
Apr 4 '17 at 4:03
It we use instead of [ and instead of ] It returns JSON Parse Error. Btw, I still post above json through terminal by syntax ./post -c name_core file_include_json_content.json
– Ken Nguyen
Apr 4 '17 at 4:52
add a comment |
up vote
0
down vote
Just remove the square braces and , at the end from Hyderabad, Chennai and Delhi.
It will work
add a comment |
up vote
0
down vote
select "JSON" from the pulldown... this accepts only a single JSON document to be added, because it wraps it in tags like so...
"add":
"doc": YOUR_TEXT_AREA_INPUT,
"boost": BOOST_FORM_INPUT,
"overwrite": CHECKBOX_INPUT,
"commitWithin": COMMIT_WITHIN_FORM_INPUT
You should be choose "Solr Command (raw XML or JSON)",like this:
"add":
"doc":
"product_catalog_name": "123",
"product_price": 80,
"product_name": "a",
"id": "33998",
"product_picture": "2014032417271233.png"
,
"add":
"doc":
"product_catalog_name": "123",
"product_price": 100,
"product_name": "b",
"id": "33999",
"product_picture": "2014032417271233.png"
Learn how to use code block
– 蕭為元
Nov 11 at 2:33
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Remove the [ ] bracket, this works for me.
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
add a comment |
up vote
2
down vote
Remove the [ ] bracket, this works for me.
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
add a comment |
up vote
2
down vote
up vote
2
down vote
Remove the [ ] bracket, this works for me.
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
Remove the [ ] bracket, this works for me.
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
edited Apr 8 '17 at 1:53
orvi
1,59311227
1,59311227
answered Apr 7 '17 at 17:42
Harmohan Sharma
211
211
add a comment |
add a comment |
up vote
0
down vote
Try to remove , before } symbol like follows
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
]
You can check json format in this link also https://jsonformatter.curiousconcept.com/
I just try and it still returns same errors Bad Request with msg: Expected: OBJECT_START but got ARRAY_START at [16]
– Ken Nguyen
Apr 4 '17 at 3:51
try to use instead of [ and instead of ]
– selvarajmas
Apr 4 '17 at 4:03
It we use instead of [ and instead of ] It returns JSON Parse Error. Btw, I still post above json through terminal by syntax ./post -c name_core file_include_json_content.json
– Ken Nguyen
Apr 4 '17 at 4:52
add a comment |
up vote
0
down vote
Try to remove , before } symbol like follows
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
]
You can check json format in this link also https://jsonformatter.curiousconcept.com/
I just try and it still returns same errors Bad Request with msg: Expected: OBJECT_START but got ARRAY_START at [16]
– Ken Nguyen
Apr 4 '17 at 3:51
try to use instead of [ and instead of ]
– selvarajmas
Apr 4 '17 at 4:03
It we use instead of [ and instead of ] It returns JSON Parse Error. Btw, I still post above json through terminal by syntax ./post -c name_core file_include_json_content.json
– Ken Nguyen
Apr 4 '17 at 4:52
add a comment |
up vote
0
down vote
up vote
0
down vote
Try to remove , before } symbol like follows
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
]
You can check json format in this link also https://jsonformatter.curiousconcept.com/
Try to remove , before } symbol like follows
[
"id" : "001",
"name" : "Ram",
"age" : 53,
"Designation" : "Manager",
"Location" : "Hyderabad"
,
"id" : "002",
"name" : "Robert",
"age" : 43,
"Designation" : "SR.Programmer",
"Location" : "Chennai"
,
"id" : "003",
"name" : "Rahim",
"age" : 25,
"Designation" : "JR.Programmer",
"Location" : "Delhi"
]
You can check json format in this link also https://jsonformatter.curiousconcept.com/
answered Apr 4 '17 at 3:32
selvarajmas
963616
963616
I just try and it still returns same errors Bad Request with msg: Expected: OBJECT_START but got ARRAY_START at [16]
– Ken Nguyen
Apr 4 '17 at 3:51
try to use instead of [ and instead of ]
– selvarajmas
Apr 4 '17 at 4:03
It we use instead of [ and instead of ] It returns JSON Parse Error. Btw, I still post above json through terminal by syntax ./post -c name_core file_include_json_content.json
– Ken Nguyen
Apr 4 '17 at 4:52
add a comment |
I just try and it still returns same errors Bad Request with msg: Expected: OBJECT_START but got ARRAY_START at [16]
– Ken Nguyen
Apr 4 '17 at 3:51
try to use instead of [ and instead of ]
– selvarajmas
Apr 4 '17 at 4:03
It we use instead of [ and instead of ] It returns JSON Parse Error. Btw, I still post above json through terminal by syntax ./post -c name_core file_include_json_content.json
– Ken Nguyen
Apr 4 '17 at 4:52
I just try and it still returns same errors Bad Request with msg: Expected: OBJECT_START but got ARRAY_START at [16]
– Ken Nguyen
Apr 4 '17 at 3:51
I just try and it still returns same errors Bad Request with msg: Expected: OBJECT_START but got ARRAY_START at [16]
– Ken Nguyen
Apr 4 '17 at 3:51
try to use instead of [ and instead of ]
– selvarajmas
Apr 4 '17 at 4:03
try to use instead of [ and instead of ]
– selvarajmas
Apr 4 '17 at 4:03
It we use instead of [ and instead of ] It returns JSON Parse Error. Btw, I still post above json through terminal by syntax ./post -c name_core file_include_json_content.json
– Ken Nguyen
Apr 4 '17 at 4:52
It we use instead of [ and instead of ] It returns JSON Parse Error. Btw, I still post above json through terminal by syntax ./post -c name_core file_include_json_content.json
– Ken Nguyen
Apr 4 '17 at 4:52
add a comment |
up vote
0
down vote
Just remove the square braces and , at the end from Hyderabad, Chennai and Delhi.
It will work
add a comment |
up vote
0
down vote
Just remove the square braces and , at the end from Hyderabad, Chennai and Delhi.
It will work
add a comment |
up vote
0
down vote
up vote
0
down vote
Just remove the square braces and , at the end from Hyderabad, Chennai and Delhi.
It will work
Just remove the square braces and , at the end from Hyderabad, Chennai and Delhi.
It will work
answered Jul 27 at 10:23
saad
276
276
add a comment |
add a comment |
up vote
0
down vote
select "JSON" from the pulldown... this accepts only a single JSON document to be added, because it wraps it in tags like so...
"add":
"doc": YOUR_TEXT_AREA_INPUT,
"boost": BOOST_FORM_INPUT,
"overwrite": CHECKBOX_INPUT,
"commitWithin": COMMIT_WITHIN_FORM_INPUT
You should be choose "Solr Command (raw XML or JSON)",like this:
"add":
"doc":
"product_catalog_name": "123",
"product_price": 80,
"product_name": "a",
"id": "33998",
"product_picture": "2014032417271233.png"
,
"add":
"doc":
"product_catalog_name": "123",
"product_price": 100,
"product_name": "b",
"id": "33999",
"product_picture": "2014032417271233.png"
Learn how to use code block
– 蕭為元
Nov 11 at 2:33
add a comment |
up vote
0
down vote
select "JSON" from the pulldown... this accepts only a single JSON document to be added, because it wraps it in tags like so...
"add":
"doc": YOUR_TEXT_AREA_INPUT,
"boost": BOOST_FORM_INPUT,
"overwrite": CHECKBOX_INPUT,
"commitWithin": COMMIT_WITHIN_FORM_INPUT
You should be choose "Solr Command (raw XML or JSON)",like this:
"add":
"doc":
"product_catalog_name": "123",
"product_price": 80,
"product_name": "a",
"id": "33998",
"product_picture": "2014032417271233.png"
,
"add":
"doc":
"product_catalog_name": "123",
"product_price": 100,
"product_name": "b",
"id": "33999",
"product_picture": "2014032417271233.png"
Learn how to use code block
– 蕭為元
Nov 11 at 2:33
add a comment |
up vote
0
down vote
up vote
0
down vote
select "JSON" from the pulldown... this accepts only a single JSON document to be added, because it wraps it in tags like so...
"add":
"doc": YOUR_TEXT_AREA_INPUT,
"boost": BOOST_FORM_INPUT,
"overwrite": CHECKBOX_INPUT,
"commitWithin": COMMIT_WITHIN_FORM_INPUT
You should be choose "Solr Command (raw XML or JSON)",like this:
"add":
"doc":
"product_catalog_name": "123",
"product_price": 80,
"product_name": "a",
"id": "33998",
"product_picture": "2014032417271233.png"
,
"add":
"doc":
"product_catalog_name": "123",
"product_price": 100,
"product_name": "b",
"id": "33999",
"product_picture": "2014032417271233.png"
select "JSON" from the pulldown... this accepts only a single JSON document to be added, because it wraps it in tags like so...
"add":
"doc": YOUR_TEXT_AREA_INPUT,
"boost": BOOST_FORM_INPUT,
"overwrite": CHECKBOX_INPUT,
"commitWithin": COMMIT_WITHIN_FORM_INPUT
You should be choose "Solr Command (raw XML or JSON)",like this:
"add":
"doc":
"product_catalog_name": "123",
"product_price": 80,
"product_name": "a",
"id": "33998",
"product_picture": "2014032417271233.png"
,
"add":
"doc":
"product_catalog_name": "123",
"product_price": 100,
"product_name": "b",
"id": "33999",
"product_picture": "2014032417271233.png"
edited Nov 11 at 2:50
Stephen Rauch
27.4k153156
27.4k153156
answered Nov 11 at 2:21
Y.Hao
1
1
Learn how to use code block
– 蕭為元
Nov 11 at 2:33
add a comment |
Learn how to use code block
– 蕭為元
Nov 11 at 2:33
Learn how to use code block
– 蕭為元
Nov 11 at 2:33
Learn how to use code block
– 蕭為元
Nov 11 at 2:33
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43197708%2fexpected-object-start-but-got-array-start-at-16%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown