title: How to send json response using plumber R
body: <p>I need to send response from R using plumber package in below format</p>
  
  <pre><code>{
    "status": "SUCCESS",
    "code": "200",
    "output": {
      "studentid": "1001",
      "name": "Kevin"
    }
  }
  </code></pre>
  
  <p>But I am getting below format </p>
  
  <pre><code>[
    "{\n  \"status\": \"SUCCESS\",\n  \"code\": \"200\",\n  \"output\": {\n    \"studentid\": \"1001\",\n    \"name\": \"Kevin\"\n  }\n}"
  ]
  </code></pre>
  
  <p>Please help me format this json properly</p>
  
  <p>My Code </p>
  
  <pre><code>#* @post /sum
  addTwo &lt;- function(){
    library(jsonlite)
    x &lt;- list(status = "SUCCESS", code = "200",output = list(studentid = "1001", name = "Kevin"))
    output&lt;-toJSON(x,pretty = TRUE, auto_unbox = TRUE)
    return (output)
  }
  </code></pre>