Пример #1
0
 public async Task WriteAsync(OutputFormatterContext context)
 {
     // Override using the selected encoding.
     context.SelectedEncoding = Encoding;
     var jsonFormatter = new JsonOutputFormatter();
     await jsonFormatter.WriteResponseBodyAsync(context);
 }
Пример #2
0
 public async Task WriteAsync(OutputFormatterContext context)
 {
     // Override using the selected encoding.
     context.SelectedEncoding = Encoding;
     var jsonFormatter = new JsonOutputFormatter(JsonOutputFormatter.CreateDefaultSettings(),
                                                 indent: false);
     await jsonFormatter.WriteResponseBodyAsync(context);
 }