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
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.