HttpResponseJsonExtensions.WriteAsJsonAsync 메서드

정의

오버로드

WriteAsJsonAsync(HttpResponse, Object, Type, CancellationToken)

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 로 설정 application/json; charset=utf-8됩니다.

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 로 설정 application/json; charset=utf-8됩니다.

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

WriteAsJsonAsync<TValue>(HttpResponse, TValue, CancellationToken)

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 로 설정 application/json; charset=utf-8됩니다.

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 로 설정 application/json; charset=utf-8됩니다.

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

WriteAsJsonAsync(HttpResponse, Object, Type, CancellationToken)

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 로 설정 application/json; charset=utf-8됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync (this Microsoft.AspNetCore.Http.HttpResponse response, object? value, Type type, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * obj * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync (response As HttpResponse, value As Object, type As Type, Optional cancellationToken As CancellationToken = Nothing) As Task

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
Object

JSON으로 쓸 값입니다.

type
Type

쓸 개체의 형식입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync (this Microsoft.AspNetCore.Http.HttpResponse response, object? value, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo, string? contentType = default, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * obj * System.Text.Json.Serialization.Metadata.JsonTypeInfo * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync (response As HttpResponse, value As Object, jsonTypeInfo As JsonTypeInfo, Optional contentType As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
Object

JSON으로 쓸 값입니다.

jsonTypeInfo
JsonTypeInfo

변환할 형식에 대한 메타데이터입니다.

contentType
String

응답에 설정할 콘텐츠 형식입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 로 설정 application/json; charset=utf-8됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync (this Microsoft.AspNetCore.Http.HttpResponse response, object? value, Type type, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * obj * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync (response As HttpResponse, value As Object, type As Type, options As JsonSerializerOptions, Optional cancellationToken As CancellationToken = Nothing) As Task

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
Object

JSON으로 쓸 값입니다.

type
Type

쓸 개체의 형식입니다.

options
JsonSerializerOptions

값을 serialize할 때 사용할 serializer 옵션입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync (this Microsoft.AspNetCore.Http.HttpResponse response, object? value, Type type, System.Text.Json.JsonSerializerOptions? options, string? contentType, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * obj * Type * System.Text.Json.JsonSerializerOptions * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync (response As HttpResponse, value As Object, type As Type, options As JsonSerializerOptions, contentType As String, Optional cancellationToken As CancellationToken = Nothing) As Task

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
Object

JSON으로 쓸 값입니다.

type
Type

쓸 개체의 형식입니다.

options
JsonSerializerOptions

값을 serialize할 때 사용할 serializer 옵션입니다.

contentType
String

응답에 설정할 콘텐츠 형식입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync (this Microsoft.AspNetCore.Http.HttpResponse response, object? value, Type type, System.Text.Json.Serialization.JsonSerializerContext context, string? contentType = default, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * obj * Type * System.Text.Json.Serialization.JsonSerializerContext * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync (response As HttpResponse, value As Object, type As Type, context As JsonSerializerContext, Optional contentType As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
Object

JSON으로 쓸 값입니다.

type
Type

쓸 개체의 형식입니다.

context
JsonSerializerContext

직렬화 가능한 형식에 대한 메타데이터 공급자입니다.

contentType
String

응답에 설정할 콘텐츠 형식입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상

WriteAsJsonAsync<TValue>(HttpResponse, TValue, CancellationToken)

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 로 설정 application/json; charset=utf-8됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync<TValue> (this Microsoft.AspNetCore.Http.HttpResponse response, TValue value, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * 'Value * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync(Of TValue) (response As HttpResponse, value As TValue, Optional cancellationToken As CancellationToken = Nothing) As Task

형식 매개 변수

TValue

쓸 개체의 형식입니다.

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
TValue

JSON으로 쓸 값입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 로 설정 application/json; charset=utf-8됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync<TValue> (this Microsoft.AspNetCore.Http.HttpResponse response, TValue value, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync(Of TValue) (response As HttpResponse, value As TValue, options As JsonSerializerOptions, Optional cancellationToken As CancellationToken = Nothing) As Task

형식 매개 변수

TValue

쓸 개체의 형식입니다.

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
TValue

JSON으로 쓸 값입니다.

options
JsonSerializerOptions

값을 serialize할 때 사용할 serializer 옵션입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync<TValue> (this Microsoft.AspNetCore.Http.HttpResponse response, TValue value, System.Text.Json.JsonSerializerOptions? options, string? contentType, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * 'Value * System.Text.Json.JsonSerializerOptions * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync(Of TValue) (response As HttpResponse, value As TValue, options As JsonSerializerOptions, contentType As String, Optional cancellationToken As CancellationToken = Nothing) As Task

형식 매개 변수

TValue

쓸 개체의 형식입니다.

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
TValue

JSON으로 쓸 값입니다.

options
JsonSerializerOptions

값을 serialize할 때 사용할 serializer 옵션입니다.

contentType
String

응답에 설정할 콘텐츠 형식입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상

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

지정된 값을 응답 본문에 JSON으로 씁니다. 응답 콘텐츠 형식은 지정된 content-type으로 설정됩니다.

public static System.Threading.Tasks.Task WriteAsJsonAsync<TValue> (this Microsoft.AspNetCore.Http.HttpResponse response, TValue value, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, string? contentType = default, System.Threading.CancellationToken cancellationToken = default);
static member WriteAsJsonAsync : Microsoft.AspNetCore.Http.HttpResponse * 'Value * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function WriteAsJsonAsync(Of TValue) (response As HttpResponse, value As TValue, jsonTypeInfo As JsonTypeInfo(Of TValue), Optional contentType As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

형식 매개 변수

TValue

쓸 개체의 형식입니다.

매개 변수

response
HttpResponse

JSON을 쓸 응답입니다.

value
TValue

JSON으로 쓸 값입니다.

jsonTypeInfo
JsonTypeInfo<TValue>

변환할 형식에 대한 메타데이터입니다.

contentType
String

응답에 설정할 콘텐츠 형식입니다.

cancellationToken
CancellationToken

CancellationToken 작업을 취소하는 데 사용되는 입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

적용 대상