public static string Create(HttpContext context, BreadResponse response) { context.Response.ContentType = ContentTypeJson; string jsonResponse = JsonConvert.SerializeObject(response, JsonSerializerSettingsProvider.SerializerSettings()); return(jsonResponse); }
public override Task ExecuteResultAsync(ActionContext context) { var json = new JsonResult(this, JsonSerializerSettingsProvider.SerializerSettings()); return(json.ExecuteResultAsync(context)); }