title: Transfer of JSON objects to View in MVC 3
body: <p>I have such a trouble. I want to return JSON object from Controller to View after AJAX request.
  JS code is:</p>
  
  <pre><code>        $.ajax(
           {
                  url : '/Order/GetArticleForBasicPosition',
                  data : article,
                  type : 'POST',
  
                  success : function (data) 
                  {
                      alert("yyyyyyy");    
                  },
                   error:function (xhr, ajaxOptions, thrownError)
                   {                   
                          alert(xhr.status); 
                          alert(thrownError);
                   }  
           });
  </code></pre>
  
  <p>And Controller is:</p>
  
  <pre><code>   [HttpPost]
      public JsonResult GetArticleForBasicPosition(string article)
      {
          Article articleInfo = _service.GetArticleForBasicPosition(article);
  
          return Json(articleInfo);
      }
  </code></pre>
  
  <p>And I get 500 Internal Server Error. I was debugging controller and I see that it gets correct parameter 'article' and service methhod returns correct object. I tryed both GET and POST types of request.</p>
  
  <p>Actually when I modified my controller as:</p>
  
  <pre><code>  [HttpPost]
      public JsonResult GetArticleForBasicPosition(string article)
      {
          var articleInfo = new Article() {GoodsName = "ffff", GoodsPrice = 1234, CatalogueName = "uuuuuuui"};
  
          return Json(articleInfo);
      }
  </code></pre>
  
  <p>everything went ok.</p>
  
  <p>I suggest that the reason is my object size(I use EntityFramework and articleInfo has a lot of navigation properties), but didn't found anybody who wrote about the same trouble.</p>
  
  <p>Does anybody know what is the reason of such trouble and if it is size of the object what is the best practice to solve it?</p>
  
  <p>Thanks. </p>