title: Unexpected end-of-input : expected close marker for Object error when trying to send a curl post request in a for loop
body: <p>I'm relatively new to bash scripts so forgive me if this is a stupid question. Here is my simple bash script. It is written to send a POST request to a REST API repeatedly. I have set up some alerts to trigger when I have reached a certain threshold of these messages. </p>
  
  <pre><code>for i in {0..600};
  do
      curl -X POST -d '{"rsID":{"action":"RECORDING_REQUESTED","ccid":"9999","rsId":"1c047ce2-8870-3072-852c-deae92a89105","chnnlId":"7438caaf-69bd-d76e-8091-3e5f60e57ad7","canonId":"1bb750d2-7b2a-2792-e21b-cdd8e41e6540","srsId":"","xtId":"SH009513260000","schDurSec":"1800","schStrtMillisecs":1539287671000,"schEndMillisecs":1539289471000,"count":40000}' -H "Content-Type:application/json" http://random-site/api/v1/proxy/folders/dvr-scheduler/services/https:dispatch-1-0-5:443/service/addSchedulerEvent;
      echo sent query $i;
      sleep 1;
  done
  </code></pre>
  
  <p>I get this error in the terminal every time </p>
  
  <pre><code>Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@24077193; line: 1, column: 1])
   at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@24077193; line: 1, column: 663]sent query 0
  Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@44d2b5af; line: 1, column: 1])
   at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@44d2b5af; line: 1, column: 663]sent query 1
  Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@f2b601e; line: 1, column: 1])
   at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@f2b601e; line: 1, column: 663]sent query 2
  </code></pre>
  
  <p>Anybody have an idea on what I am doing wrong? </p>
  
  <p>EDIT: note that schDurSec is a String, while schStrtMillisecs, schEndMillisecs and count are integers.</p>