title: How can I produce valid JSON using the toJSON method from rjson/RJSONIO in R?
body: <p>given the following R code:</p>
  
  <pre><code>library(rjson)
  x &lt;- c(3:5)
  toJSON(x)
  </code></pre>
  
  <p>it produces:</p>
  
  <pre><code>[1] "[3,4,5]"
  </code></pre>
  
  <p>when I am expecting something like:</p>
  
  <pre><code>"[3,4,5]"
  </code></pre>
  
  <p>I am a new to R, I guess this is something easy to do, but I had have no luck finding a solution.</p>