Extending the great answer from Dave. You can create a simple HtmlHelper.
public static IHtmlString RenderAsJson(this HtmlHelper helper, object model)
{
return helper.Raw(Json.Encode(model));
}
And in your view:
@Html.RenderAsJson(Model)
This way you can centralize the logic for creating the JSON if you, for some reason, would like to change the logic later.