次の方法で共有


OpenApiSerializableExtensions.SerializeAsJson Method

Definition

Overloads

SerializeAsJson<T>(T, OpenApiSpecVersion)

Serializes the IOpenApiSerializable to the Open API document as a string in JSON format.

SerializeAsJson<T>(T, Stream, OpenApiSpecVersion)

Serialize the IOpenApiSerializable to the Open API document (JSON) using the given stream and specification version.

SerializeAsJson<T>(T, OpenApiSpecVersion)

Serializes the IOpenApiSerializable to the Open API document as a string in JSON format.

public static string SerializeAsJson<T> (this T element, Microsoft.OpenApi.OpenApiSpecVersion specVersion) where T : Microsoft.OpenApi.Interfaces.IOpenApiSerializable;
static member SerializeAsJson : 'T * Microsoft.OpenApi.OpenApiSpecVersion -> string (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiSerializable)
<Extension()>
Public Function SerializeAsJson(Of T As IOpenApiSerializable) (element As T, specVersion As OpenApiSpecVersion) As String

Type Parameters

Parameters

element
T

The Open API element.

specVersion
OpenApiSpecVersion

The Open API specification version.

Returns

Applies to

SerializeAsJson<T>(T, Stream, OpenApiSpecVersion)

Serialize the IOpenApiSerializable to the Open API document (JSON) using the given stream and specification version.

public static void SerializeAsJson<T> (this T element, System.IO.Stream stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion) where T : Microsoft.OpenApi.Interfaces.IOpenApiSerializable;
static member SerializeAsJson : 'T * System.IO.Stream * Microsoft.OpenApi.OpenApiSpecVersion -> unit (requires 'T :> Microsoft.OpenApi.Interfaces.IOpenApiSerializable)
<Extension()>
Public Sub SerializeAsJson(Of T As IOpenApiSerializable) (element As T, stream As Stream, specVersion As OpenApiSpecVersion)

Type Parameters

Parameters

element
T

The Open API element.

stream
Stream

The output stream.

specVersion
OpenApiSpecVersion

The Open API specification version.

Applies to