title: How can I return JSON from a Rust (Rocket) HTTP endpoint?
body: <p>What is the easiest way to return Json via Rocket in Rust?</p>
  <pre><code>#[post(&quot;/route&quot;, data = &quot;&lt;data&gt;&quot;)]
  fn route(someVariable: String) -&gt; String {
      // How can I return a json response here? {&quot;a&quot;: &quot;{someVariable}&quot;)
  }
  </code></pre>
  <p>I tried: <code>content::Json()</code> but it seemed too static for me.</p>