Delen via


HttpResponseJsonExtensions Class

Definition

Provides extension methods for writing a JSON serialized value to the HTTP response.

public ref class HttpResponseJsonExtensions abstract sealed
public static class HttpResponseJsonExtensions
type HttpResponseJsonExtensions = class
Public Module HttpResponseJsonExtensions
Inheritance
HttpResponseJsonExtensions

Methods

WriteAsJsonAsync(HttpResponse, Object, JsonTypeInfo, String, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to the specified content-type.

WriteAsJsonAsync(HttpResponse, Object, Type, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to application/json; charset=utf-8.

WriteAsJsonAsync(HttpResponse, Object, Type, JsonSerializerContext, String, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to the specified content-type.

WriteAsJsonAsync(HttpResponse, Object, Type, JsonSerializerOptions, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to application/json; charset=utf-8.

WriteAsJsonAsync(HttpResponse, Object, Type, JsonSerializerOptions, String, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to the specified content-type.

WriteAsJsonAsync<TValue>(HttpResponse, TValue, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to application/json; charset=utf-8.

WriteAsJsonAsync<TValue>(HttpResponse, TValue, JsonSerializerOptions, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to application/json; charset=utf-8.

WriteAsJsonAsync<TValue>(HttpResponse, TValue, JsonSerializerOptions, String, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to the specified content-type.

WriteAsJsonAsync<TValue>(HttpResponse, TValue, JsonTypeInfo<TValue>, String, CancellationToken)

Write the specified value as JSON to the response body. The response content-type will be set to the specified content-type.

Applies to