JsonResource.cs 465 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Newtonsoft.Json;
  5. using GenHTTP.Modules.Webservices;
  6. namespace Benchmarks.Tests
  7. {
  8. public class JsonResult
  9. {
  10. [JsonProperty("message")]
  11. public string? Message { get; set; }
  12. }
  13. public class JsonResource
  14. {
  15. [Method]
  16. public JsonResult GetMessage() => new JsonResult() { Message = "Hello, World!" };
  17. }
  18. }