title: Extra slashes when sending json for url request
body: <p>I want to send <code>json</code> format data for a url request. My code is as follows with <code>num</code> as an input;</p>
  
  <pre><code>#* @get /getComm
  getComm &lt;- function(num=1){
  library(jsonlite) 
  #some computation here
  lst&lt;-list(links=linksff,nodes=sc,directed=FALSE,multigraph=FALSE)
  return(toJSON(lst))
  }
  </code></pre>
  
  <p>And I use <code>plumber</code> library to make my code as an API.
  the <code>lst</code> list is like below for num=1;</p>
  
  <pre><code>$links
    source target
  1      0      3
  2      2      5
  3      1      4
  
  $nodes
    size score  id   type
  1   10    10   7 circle
  2   10    10 179 circle
  3   10    10 128 circle
  4   10    10 191 circle
  5   10    10 239 circle
  6   10    10 218 circle
  
  $directed
  [1] FALSE
  
  $multigraph
  [1] FALSE
  </code></pre>
  
  <p>When I convert it to <code>json</code> by <code>toJSON(lst)</code> the json format is correct:</p>
  
  <blockquote>
    <p>{"links":[{"source":0,"target":3},{"source":2,"target":5},{"source":1,"target":4}],"nodes":[{"size":10,"score":10,"id":7,"type":"circle"},{"size":10,"score":10,"id":179,"type":"circle"},{"size":10,"score":10,"id":128,"type":"circle"},{"size":10,"score":10,"id":191,"type":"circle"},{"size":10,"score":10,"id":239,"type":"circle"},{"size":10,"score":10,"id":218,"type":"circle"}],"directed":[false],"multigraph":[false]}</p>
  </blockquote>
  
  <p>however, when I send url request to get json, the browser cannot correctly diagnose <code>json</code> format and the are extra slashe_which I know means space in R.
  the response for the url request <code>http://127.0.0.1:8000/getComm?num=1</code> is like below;</p>
  
  <blockquote>
    <p>["{\"links\":[{\"source\":0,\"target\":3},{\"source\":2,\"target\":5},{\"source\":1,\"target\":4}],\"nodes\":[{\"size\":10,\"score\":10,\"id\":7,\"type\":\"circle\"},{\"size\":10,\"score\":10,\"id\":179,\"type\":\"circle\"},{\"size\":10,\"score\":10,\"id\":128,\"type\":\"circle\"},{\"size\":10,\"score\":10,\"id\":191,\"type\":\"circle\"},{\"size\":10,\"score\":10,\"id\":239,\"type\":\"circle\"},{\"size\":10,\"score\":10,\"id\":218,\"type\":\"circle\"}],\"directed\":[false],\"multigraph\":[false]}"]</p>
  </blockquote>
  
  <p>where do these slashes come from?</p>