title: How could I render to a string a JSON representation of a JBuilder view?
body: <p>I'm using <a href="https://github.com/rails/jbuilder" rel="noreferrer">JBuilder</a> as to return some JSON. I have a <code>index.json.jbuilder</code> that generates the data, and I need to render it to a string. However, I'm not sure how to do this, since: <code>@my_object.to_json</code> and <code>@my_object.as_json</code> don't seem to go through JBuilder. </p>
  
  <p>How could I render the JBuilder view as a string?</p>