public static string Create(HttpContext context, BreadResponse response)
        {
            context.Response.ContentType = ContentTypeJson;

            string jsonResponse =
                JsonConvert.SerializeObject(response, JsonSerializerSettingsProvider.SerializerSettings());

            return(jsonResponse);
        }
Example #2
0
        public override Task ExecuteResultAsync(ActionContext context)
        {
            var json = new JsonResult(this, JsonSerializerSettingsProvider.SerializerSettings());

            return(json.ExecuteResultAsync(context));
        }