On Thursday, September 18, 2014 at 12:40 CEST,
     Foobar Geez <foobarg...@gmail.com> wrote:

> Thanks.  I provided a bad example as I guess I over-simplified it and
> also edited it to remove proprietary data (thus, missed }).
> The following example exhibits the same issue as described in my
> original post.
> curl -XPUT '[1]http://localhost:9200/test/test/test' -d '
> {
>              "rules": [
>                 {
>                     "users" : [ "mile\kilo" ]
>               }
>               ]
> }'
> {"error":"RemoteTransportException[[High-Tech][inet[/X.X.X.X:9300]][ind
> ex]]; nested: MapperParsingException[failed to parse [rules.users]];
> nested: JsonParseException[Unrecognized character escape 'k' (code
> 107)\n at [Source: UNKNOWN; line: 5, column: 40]]; ","status":400}

As with many other languages, literal backslashes in string literals
need to be written \\.

curl -XPUT 'http://localhost:9200/test/test/test' -d '
{
             "rules": [
                {
                    "users" : [ "mile\\kilo" ]
              }
              ]
}'

-- 
Magnus Bäck                | Software Engineer, Development Tools
magnus.b...@sonymobile.com | Sony Mobile Communications

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/20140919064348.GE21271%40seldlx20533.corpusers.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to