AspNetFrameworksPerformance.Handler.JsonRequest C# (CSharp) Méthode

JsonRequest() public méthode

public JsonRequest ( HttpContext context ) : void
context System.Web.HttpContext
Résultat void
        public void JsonRequest(HttpContext context)
        {
            var json = JsonConvert.SerializeObject(new Person(), Formatting.None);
            context.Response.ContentType = "application/json";
            context.Response.Write(json);
        }