title: How to return a JsonResult in ASP.NET MVC
body: <p>i have the following data as a string in my Action method:</p>
  
  <pre><code>string json = "[[1,2],[3,4],[5,6]]";
  </code></pre>
  
  <p>Simple.</p>
  
  <p>When I call the Json view, it encapsulates the result in two double quotes. This stops the client side javascript from loading this result into a javascript object.</p>
  
  <pre><code>eg. 
  return Json(json);
  
  result =&gt; "[[1,2],[3,4],[5,6]]"
  </code></pre>
  
  <p>but, if i return the result as a ContentResult, then the result gets loaded into a javascript object and I can do whatever I need to do, with it.</p>
  
  <pre><code>eg.
  return new ContentResult
  {
      Content = json,
      ContentType = "application/json",
      ContentEncoding =System.Text.Encoding.UTF8
  };
  
  result =&gt; [[1,2],[3,4],[5,6]]      
            (notice how the double quotes are missing?).
  </code></pre>
  
  <p>So, can someone explain what i should be doing right, please? I feel like the ContentResult is not the right way to do it.</p>