I want to convert a .Net object in to JSON in the view. My view model is like this,
public class ViewModel{ public SearchResult SearchResult { get; set;}
Try using this method:
@Html.Raw(Json.Encode(Model.Content))