# Indexing new lines in the JSON data part (bulk operation)

**URL:** <https://discuss.elastic.co/t/indexing-new-lines-in-the-json-data-part-bulk-operation/11651>\
**Category:** Elasticsearch\
**Created:** [April 21, 2013, 11:38am UTC](https://discuss.elastic.co/t/indexing-new-lines-in-the-json-data-part-bulk-operation/11651 "2013-04-21T11:38:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdo](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@abdo](https://discuss.elastic.co/u/abdo)\
**Post date:** [April 21, 2013, 11:38am UTC](https://discuss.elastic.co/t/indexing-new-lines-in-the-json-data-part-bulk-operation/11651/1 "2013-04-21T11:38:51Z")

</div>

Hi all

I need to index some json documents with some fields containing new lines  
in a bulk operation, the operation fails.

any help will be appreciated

regards

Abelmuhaimn

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [April 21, 2013, 11:56am UTC](https://discuss.elastic.co/t/indexing-new-lines-in-the-json-data-part-bulk-operation/11651/2 "2013-04-21T11:56:50Z")

</div>

The newline is a reserved character in JSON bulk streams, you have to  
escape the character.

Jörg

Am 21.04.13 13:38, schrieb Abdelmuhaimen Mohamed:

> Hi all
> 
> I need to index some json documents with some fields containing new  
> lines in a bulk operation, the operation fails.
> 
> any help will be appreciated

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:40am UTC](https://discuss.elastic.co/t/indexing-new-lines-in-the-json-data-part-bulk-operation/11651/3 "2017-07-06T02:40:18Z")

</div>


