title: Illegal unquoted character ((CTRL-CHAR, code 10))
body: <p>I’m having issue consuming REST API. Below is my rest client. It fails at the service call with error:</p>
  <pre><code>org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value; nested exception is com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value
  at [Source: java.io.PushbackInputStream@62a8dd06; line: 11, column: 55]
  </code></pre>
  <p>When I use the same json string (printed in the log) in postman, it works. It fails when I fire the request from my client.</p>
  <pre><code>HttpHeaders headers = new HttpHeaders();
  headers.setContentType(MediaType.APPLICATION_JSON);
  headers.add(&quot;Authorization&quot;, &quot;Basic &quot; + base64Creds);
  try {
      request = mapper.constructRequest(txnRequest, params);
      logger.debug(method + &quot; Request: &quot; + request);
      ObjectMapper map = new ObjectMapper();
      logger.debug(method + &quot; Request in json format: &quot; + 
      map.writeValueAsString(request));
               
      myRequest = new HttpEntity&lt;MyRequest&gt;(request, headers);
      response = restTemplate.exchange(url, HttpMethod.POST, myRequest, MyResponse.class);
      logger.debug(method + &quot; response: &quot; + response);
  } catch(Exception ex) {
      ex.printStackTrace();
  }
  </code></pre>
  <p>Any help is much appreciated.</p>