# Unable to parse data when I try to POST to Elasticsearch

**URL:** <https://discuss.elastic.co/t/unable-to-parse-data-when-i-try-to-post-to-elasticsearch/210227>\
**Category:** Elasticsearch\
**Created:** [December 2, 2019, 6:14pm UTC](https://discuss.elastic.co/t/unable-to-parse-data-when-i-try-to-post-to-elasticsearch/210227 "2019-12-02T18:14:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chari](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@chari](https://discuss.elastic.co/u/chari)\
**Post date:** [December 2, 2019, 6:14pm UTC](https://discuss.elastic.co/t/unable-to-parse-data-when-i-try-to-post-to-elasticsearch/210227/1 "2019-12-02T18:14:10Z")

</div>

page='ABCD'  
header='{"content":"'  
footer='", "my-join-field":{"name": "my\_page","parent": "1"}}'

!curl -X POST "localhost:9200/docpage/\_doc/?refresh&pretty" -H 'Content-Type: application/json' -d"$header$page$footer"

I can run this command successfully in bash. But when I try to run it in a jupyter notebook, I get an error...  
"type" : "mapper\_parsing\_exception",  
"reason" : "failed to parse",  
"caused\_by" : {  
"type" : "json\_parse\_exception",  
"reason" : "Unexpected character ('c' (code 99)): was expecting double-quote to start field name\n at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@72df2b92; line: 1, column: 3]"  
}

---

<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:** [December 30, 2019, 6:14pm UTC](https://discuss.elastic.co/t/unable-to-parse-data-when-i-try-to-post-to-elasticsearch/210227/2 "2019-12-30T18:14:14Z")

</div>

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