title: Getting a Server-Side JsonParseException / Char code 31 on Index Creation via Nest
body: <p>Good afternoon,</p>
  
  <p>I am currently struggling a bit with index creation requests towards a hosted Elastic Search Service (FacetFlow), more precisely, the ES server returns a JsonParseException and returns a http 500 response and the Nest client (correctly) reports the index creation request to have failed (non valid/not acknowledged etc)</p>
  
  <p>I sniffed the http traffic via fiddler and what gets sent over is the following:</p>
  
  <pre><code>POST https://myhostedesinstance.west-eu.azr.facetflow.io/users-dev HTTP/1.1
  Accept: application/json
  Content-Type: application/json
  Accept-Encoding: gzip,deflate
  Authorization: Basic &lt;cutforobviousreasons&gt;
  Host: myhostedesinstance.west-eu.azr.facetflow.io
  Content-Length: 891
  
  {
    "settings": {
      "index": {
        "number_of_replicas": 0,
        "number_of_shards": 1
      }
    },
    "mappings": {
      "user": {
        "_all": {
          "enabled": false
        },
        "_ttl": {
          "enabled": false
        },
        "properties": {
          "dateOfBirth": {
            "index": "not_analyzed",
            "type": "date"
          },
          "gender": {
            "index": "not_analyzed",
            "type": "integer"
          },
          "username": {
            "index": "not_analyzed",
            "type": "string"
          },
          "usernameSuggestions": {
            "type": "completion",
            "payloads": false
          },
          "id": {
            "index": "not_analyzed",
            "type": "string"
          },
          "createdAtUtc": {
            "index": "not_analyzed",
            "type": "date"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>..and  what I get back is the following:</p>
  
  <pre><code>HTTP/1.1 500 Server Error
  Server: nginx/1.4.7
  Date: Wed, 01 Jul 2015 21:17:11 GMT
  Content-Type: application/json; charset=UTF-8
  Content-Length: 199
  Connection: keep-alive
  Access-Control-Allow-Origin: *
  Access-Control-Allow-Credentials: true
  
  {"error":"JsonParseException[Illegal character ((CTRL-CHAR, code 31)): only regular white space (\\r, \\n, \\t) is allowed between tokens\n at [Source: [B@a4fb74c; line: 1, column: 2]]","status":500}
  </code></pre>
  
  <p>I am using Nest 1.6.1 and Json.Net 7.0.1 and to 'me' that Json sent over to the server looks fine.. or am I missing something? Does anyone happen to know what might be going on?</p>
  
  <p>I have not changed any serialization settings of Nest/Json.Net so I am somewhat confused why this might happen.</p>