.

Custom Json

This is how you can write out your own custom Json code in MVC:

public ActionResult hello()
{
    dynamic d = new JObject();
    d.MetricId = 11;
    string json = Newtonsoft.Json.JsonConvert.SerializeObject(d);
    return Content(json,"JSon");
}

What's your thoughts on this?

*

Protected by WP Anti Spam