You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
473 B

4 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Apewer.AspNetBridge
  5. {
  6. /// <summary></summary>
  7. public class JsonResult : HttpActionResult
  8. {
  9. /// <summary></summary>
  10. public JsonResult(object content)
  11. {
  12. var json = Json.From(content);
  13. var text = json == null ? "" : json.ToString();
  14. Bytes = text.Bytes();
  15. ContentType = "application/json";
  16. }
  17. }
  18. }