WebOperationContext.CreateJsonResponse<T> Method (T, DataContractJsonSerializer)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a JSON formatted message.

Namespace:   System.ServiceModel.Web
Assembly:  System.ServiceModel.Web (in System.ServiceModel.Web.dll)

public Message CreateJsonResponse<T>(
	T instance,
	DataContractJsonSerializer serializer
)

Parameters

instance
Type: T

The object to write to the message.

serializer
Type: System.Runtime.Serialization.Json.DataContractJsonSerializer

The serializer to use.

Return Value

Type: System.ServiceModel.Channels.Message

A JSON formatted message.

Type Parameters

T

The type of object to write to the message.

.NET Framework
Available since 4.0
Return to top
Show: