WebOperationContext.CreateJsonResponse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a message in JSON format.
Overloads
CreateJsonResponse<T>(T) |
Creates a JSON formatted message. |
CreateJsonResponse<T>(T, DataContractJsonSerializer) |
Creates a JSON formatted message. |
CreateJsonResponse<T>(T)
Creates a JSON formatted message.
public:
generic <typename T>
System::ServiceModel::Channels::Message ^ CreateJsonResponse(T instance);
public System.ServiceModel.Channels.Message CreateJsonResponse<T> (T instance);
member this.CreateJsonResponse : 'T -> System.ServiceModel.Channels.Message
Public Function CreateJsonResponse(Of T) (instance As T) As Message
Type Parameters
- T
The type of object to write to the message.
Parameters
- instance
- T
The object to write to the message.
Returns
A JSON formatted message.
Applies to
CreateJsonResponse<T>(T, DataContractJsonSerializer)
Creates a JSON formatted message.
public:
generic <typename T>
System::ServiceModel::Channels::Message ^ CreateJsonResponse(T instance, System::Runtime::Serialization::Json::DataContractJsonSerializer ^ serializer);
public System.ServiceModel.Channels.Message CreateJsonResponse<T> (T instance, System.Runtime.Serialization.Json.DataContractJsonSerializer serializer);
member this.CreateJsonResponse : 'T * System.Runtime.Serialization.Json.DataContractJsonSerializer -> System.ServiceModel.Channels.Message
Public Function CreateJsonResponse(Of T) (instance As T, serializer As DataContractJsonSerializer) As Message
Type Parameters
- T
The type of object to write to the message.
Parameters
- instance
- T
The object to write to the message.
- serializer
- DataContractJsonSerializer
The serializer to use.
Returns
A JSON formatted message.
Applies to
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro