# JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped

**URL:** <https://discuss.elastic.co/t/jsonparseexception-illegal-unquoted-character-ctrl-char-code-9-has-to-be-escaped/12410>\
**Category:** Elasticsearch\
**Created:** [June 14, 2013, 3:40am UTC](https://discuss.elastic.co/t/jsonparseexception-illegal-unquoted-character-ctrl-char-code-9-has-to-be-escaped/12410 "2013-06-14T03:40:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Andhavarapu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_andhavarapu/32/782_2.png) [@Abhishek\_Andhavarapu](https://discuss.elastic.co/u/Abhishek_Andhavarapu)\
**Post date:** [June 14, 2013, 3:40am UTC](https://discuss.elastic.co/t/jsonparseexception-illegal-unquoted-character-ctrl-char-code-9-has-to-be-escaped/12410/1 "2013-06-14T03:40:35Z")

</div>

Hi All,

I'm getting these exceptions when indexing user comments

_Caused by: org.elasticsearch.common.jackson.core.JsonParseException:  
Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using  
backslash to be included in string value_

- at [Source: [B@3c4ecbf; line: 1, column: 3033785]\*

When indexing this

value : "I do not know about an "industry l  
eader." I bank"

_Caused by: org.elasticsearch.common.jackson.core.JsonParseException:  
Unexpected character ('i' (code 105)): was expecting comma to separate  
OBJECT entries_

- at [Source: [B@2112b320; line: 1, column: 1234]\*

I also found this at [http://jira.codehaus.org/browse/JACKSON-208](http://jira.codehaus.org/browse/JACKSON-208)

How do I handle special characters like this ? Should I be handling this  
while I'm indexing if yes ? Any tips ?

Thanks

--  
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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 16, 2013, 5:29pm UTC](https://discuss.elastic.co/t/jsonparseexception-illegal-unquoted-character-ctrl-char-code-9-has-to-be-escaped/12410/2 "2013-06-16T17:29:56Z")

</div>

Hey,

you have to provide valid JSON to elasticsearch in order to get data  
indexed.  
This link should help in order to find out what kind of data you have to  
escape

> <https://stackoverflow.com/questions/983451/where-can-i-find-a-list-of-escape-characters-required-for-my-json-ajax-return-ty>

--Alex

On Fri, Jun 14, 2013 at 5:40 AM, Abhishek Andhavarapu \<[abhishek376@gmail.com](mailto:abhishek376@gmail.com)

> wrote:

> Hi All,
> 
> I'm getting these exceptions when indexing user comments
> 
> _Caused by: org.elasticsearch.common.jackson.core.JsonParseException:  
> Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using  
> backslash to be included in string value_
> 
> - at [Source: [B@3c4ecbf; line: 1, column: 3033785]\*
> 
> When indexing this
> 
> value : "I do not know about an "industry l  
> eader." I bank"
> 
> _Caused by: org.elasticsearch.common.jackson.core.JsonParseException:  
> Unexpected character ('i' (code 105)): was expecting comma to separate  
> OBJECT entries_
> 
> - at [Source: [B@2112b320; line: 1, column: 1234]\*
> 
> I also found this at [http://jira.codehaus.org/browse/JACKSON-208](http://jira.codehaus.org/browse/JACKSON-208)
> 
> How do I handle special characters like this ? Should I be handling this  
> while I'm indexing if yes ? Any tips ?
> 
> Thanks
> 
> --  
> 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).

--  
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:** ![Abhishek\_Andhavarapu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_andhavarapu/32/782_2.png) [@Abhishek\_Andhavarapu](https://discuss.elastic.co/u/Abhishek_Andhavarapu)\
**Post date:** [June 18, 2013, 5:46pm UTC](https://discuss.elastic.co/t/jsonparseexception-illegal-unquoted-character-ctrl-char-code-9-has-to-be-escaped/12410/3 "2013-06-18T17:46:34Z")

</div>

Thanks Alex. I'm was curious as ES is based on text search if there was a  
better way to handle this. So will have to check these while inserting the  
data.

On Sun, Jun 16, 2013 at 11:29 AM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de)wrote:

> Hey,
> 
> you have to provide valid JSON to elasticsearch in order to get data  
> indexed.  
> This link should help in order to find out what kind of data you have to  
> escape
> 
> [asp.net mvc - Where can I find a list of escape characters required for my JSON ajax return type? - Stack Overflow](http://stackoverflow.com/questions/983451/where-can-i-find-a-list-of-escape-characters-required-for-my-json-ajax-return-ty)
> 
> --Alex
> 
> On Fri, Jun 14, 2013 at 5:40 AM, Abhishek Andhavarapu \<  
> [abhishek376@gmail.com](mailto:abhishek376@gmail.com)\> wrote:
> 
> > Hi All,
> > 
> > I'm getting these exceptions when indexing user comments
> > 
> > _Caused by: org.elasticsearch.common.jackson.core.JsonParseException:  
> > Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using  
> > backslash to be included in string value_
> > 
> > - at [Source: [B@3c4ecbf; line: 1, column: 3033785]\*
> > 
> > When indexing this
> > 
> > value : "I do not know about an "industry l  
> > eader." I bank"
> > 
> > _Caused by: org.elasticsearch.common.jackson.core.JsonParseException:  
> > Unexpected character ('i' (code 105)): was expecting comma to separate  
> > OBJECT entries_
> > 
> > - at [Source: [B@2112b320; line: 1, column: 1234]\*
> > 
> > I also found this at [http://jira.codehaus.org/browse/JACKSON-208](http://jira.codehaus.org/browse/JACKSON-208)
> > 
> > How do I handle special characters like this ? Should I be handling this  
> > while I'm indexing if yes ? Any tips ?
> > 
> > Thanks
> > 
> > --  
> > 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).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/k9ys6XqLE6U/unsubscribe](https://groups.google.com/d/topic/elasticsearch/k9ys6XqLE6U/unsubscribe).  
> To unsubscribe from this group and all its topics, 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).

--  
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:30am UTC](https://discuss.elastic.co/t/jsonparseexception-illegal-unquoted-character-ctrl-char-code-9-has-to-be-escaped/12410/4 "2017-07-06T02:30:32Z")

</div>


