Results.Json 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
Json(Object, JsonSerializerOptions, String, Nullable<Int32>) |
지정된 개체를 IResult JSON으로 직렬화하는 을 |
Json(Object, JsonTypeInfo, String, Nullable<Int32>) |
지정된 개체를 IResult JSON으로 직렬화하는 을 |
Json(Object, Type, JsonSerializerContext, String, Nullable<Int32>) |
지정된 개체를 IResult JSON으로 직렬화하는 을 |
Json<TValue>(TValue, JsonSerializerOptions, String, Nullable<Int32>) |
지정된 개체를 IResult JSON으로 직렬화하는 을 |
Json<TValue>(TValue, JsonSerializerContext, String, Nullable<Int32>) |
지정된 개체를 IResult JSON으로 직렬화하는 을 |
Json<TValue>(TValue, JsonTypeInfo<TValue>, String, Nullable<Int32>) |
지정된 개체를 IResult JSON으로 직렬화하는 을 |
Json(Object, JsonSerializerOptions, String, Nullable<Int32>)
지정된 개체를 IResult JSON으로 직렬화하는 을 data
만듭니다.
public static Microsoft.AspNetCore.Http.IResult Json (object? data, System.Text.Json.JsonSerializerOptions? options = default, string? contentType = default, int? statusCode = default);
static member Json : obj * System.Text.Json.JsonSerializerOptions * string * Nullable<int> -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Json (data As Object, Optional options As JsonSerializerOptions = Nothing, Optional contentType As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing) As IResult
매개 변수
- data
- Object
JSON으로 쓸 개체입니다.
- options
- JsonSerializerOptions
값을 serialize할 때 사용할 serializer 옵션입니다.
- contentType
- String
응답에 설정할 콘텐츠 형식입니다.
반환
JsonHttpResult<TValue> 지정된 를 응답에 data
대한 JSON 형식으로 직렬화하는 입니다.
설명
호출자는 각 호출을 통해 캐시된 데이터를 다시 생성하지 않도록 직렬 변환기 설정의 instance 캐시해야 합니다.
적용 대상
Json(Object, JsonTypeInfo, String, Nullable<Int32>)
지정된 개체를 IResult JSON으로 직렬화하는 을 data
만듭니다.
public static Microsoft.AspNetCore.Http.IResult Json (object? data, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo, string? contentType = default, int? statusCode = default);
static member Json : obj * System.Text.Json.Serialization.Metadata.JsonTypeInfo * string * Nullable<int> -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Json (data As Object, jsonTypeInfo As JsonTypeInfo, Optional contentType As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing) As IResult
매개 변수
- data
- Object
JSON으로 쓸 개체입니다.
- jsonTypeInfo
- JsonTypeInfo
변환할 형식에 대한 메타데이터입니다.
- contentType
- String
응답에 설정할 콘텐츠 형식입니다.
반환
JsonHttpResult<TValue> 지정된 를 응답에 data
대한 JSON 형식으로 직렬화하는 입니다.
설명
호출자는 각 호출을 통해 캐시된 데이터를 다시 생성하지 않도록 직렬 변환기 설정의 instance 캐시해야 합니다.
적용 대상
Json(Object, Type, JsonSerializerContext, String, Nullable<Int32>)
지정된 개체를 IResult JSON으로 직렬화하는 을 data
만듭니다.
public static Microsoft.AspNetCore.Http.IResult Json (object? data, Type type, System.Text.Json.Serialization.JsonSerializerContext context, string? contentType = default, int? statusCode = default);
static member Json : obj * Type * System.Text.Json.Serialization.JsonSerializerContext * string * Nullable<int> -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Json (data As Object, type As Type, context As JsonSerializerContext, Optional contentType As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing) As IResult
매개 변수
- data
- Object
JSON으로 쓸 개체입니다.
- type
- Type
쓸 개체의 형식입니다.
- context
- JsonSerializerContext
직렬화 가능한 형식에 대한 메타데이터 공급자입니다.
- contentType
- String
응답에 설정할 콘텐츠 형식입니다.
반환
JsonHttpResult<TValue> 지정된 를 응답에 data
대한 JSON 형식으로 직렬화하는 입니다.
설명
호출자는 각 호출을 통해 캐시된 데이터를 다시 생성하지 않도록 직렬 변환기 설정의 instance 캐시해야 합니다.
적용 대상
Json<TValue>(TValue, JsonSerializerOptions, String, Nullable<Int32>)
지정된 개체를 IResult JSON으로 직렬화하는 을 data
만듭니다.
public static Microsoft.AspNetCore.Http.IResult Json<TValue> (TValue? data, System.Text.Json.JsonSerializerOptions? options = default, string? contentType = default, int? statusCode = default);
static member Json : 'Value * System.Text.Json.JsonSerializerOptions * string * Nullable<int> -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Json(Of TValue) (data As TValue, Optional options As JsonSerializerOptions = Nothing, Optional contentType As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing) As IResult
형식 매개 변수
- TValue
매개 변수
- data
- TValue
JSON으로 쓸 개체입니다.
- options
- JsonSerializerOptions
값을 serialize할 때 사용할 serializer 옵션입니다.
- contentType
- String
응답에 설정할 콘텐츠 형식입니다.
반환
JsonHttpResult<TValue> 지정된 를 응답에 data
대한 JSON 형식으로 직렬화하는 입니다.
설명
호출자는 각 호출을 통해 캐시된 데이터를 다시 생성하지 않도록 직렬 변환기 설정의 instance 캐시해야 합니다.
적용 대상
Json<TValue>(TValue, JsonSerializerContext, String, Nullable<Int32>)
지정된 개체를 IResult JSON으로 직렬화하는 을 data
만듭니다.
public static Microsoft.AspNetCore.Http.IResult Json<TValue> (TValue? data, System.Text.Json.Serialization.JsonSerializerContext context, string? contentType = default, int? statusCode = default);
static member Json : 'Value * System.Text.Json.Serialization.JsonSerializerContext * string * Nullable<int> -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Json(Of TValue) (data As TValue, context As JsonSerializerContext, Optional contentType As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing) As IResult
형식 매개 변수
- TValue
매개 변수
- data
- TValue
JSON으로 쓸 개체입니다.
- context
- JsonSerializerContext
직렬화 가능한 형식에 대한 메타데이터 공급자입니다.
- contentType
- String
응답에 설정할 콘텐츠 형식입니다.
반환
JsonHttpResult<TValue> 지정된 를 응답에 data
대한 JSON 형식으로 직렬화하는 입니다.
설명
호출자는 각 호출을 통해 캐시된 데이터를 다시 생성하지 않도록 직렬 변환기 설정의 instance 캐시해야 합니다.
적용 대상
Json<TValue>(TValue, JsonTypeInfo<TValue>, String, Nullable<Int32>)
지정된 개체를 IResult JSON으로 직렬화하는 을 data
만듭니다.
public static Microsoft.AspNetCore.Http.IResult Json<TValue> (TValue? data, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, string? contentType = default, int? statusCode = default);
static member Json : 'Value * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * string * Nullable<int> -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Json(Of TValue) (data As TValue, jsonTypeInfo As JsonTypeInfo(Of TValue), Optional contentType As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing) As IResult
형식 매개 변수
- TValue
매개 변수
- data
- TValue
JSON으로 쓸 개체입니다.
- jsonTypeInfo
- JsonTypeInfo<TValue>
변환할 형식에 대한 메타데이터입니다.
- contentType
- String
응답에 설정할 콘텐츠 형식입니다.
반환
JsonHttpResult<TValue> 지정된 를 응답에 data
대한 JSON 형식으로 직렬화하는 입니다.
설명
호출자는 각 호출을 통해 캐시된 데이터를 다시 생성하지 않도록 직렬 변환기 설정의 instance 캐시해야 합니다.
적용 대상
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기