JsonMessageFormatter.Serialize 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.
Overloads
Serialize(JsonRpcMessage) |
Serializes a JsonRpcMessage to a Newtonsoft.Json.Linq.JToken. |
Serialize(IBufferWriter<Byte>, JsonRpcMessage) |
Serializes a JsonRpcMessage. |
Serialize(JsonRpcMessage)
Serializes a JsonRpcMessage to a Newtonsoft.Json.Linq.JToken.
public Newtonsoft.Json.Linq.JToken Serialize (StreamJsonRpc.Protocol.JsonRpcMessage message);
member this.Serialize : StreamJsonRpc.Protocol.JsonRpcMessage -> Newtonsoft.Json.Linq.JToken
Public Function Serialize (message As JsonRpcMessage) As JToken
Parameters
- message
- JsonRpcMessage
The message to serialize.
Returns
Newtonsoft.Json.Linq.JToken
The JSON of the message.
Applies to
Serialize(IBufferWriter<Byte>, JsonRpcMessage)
Serializes a JsonRpcMessage.
public void Serialize (System.Buffers.IBufferWriter<byte> contentBuffer, StreamJsonRpc.Protocol.JsonRpcMessage message);
abstract member Serialize : System.Buffers.IBufferWriter<byte> * StreamJsonRpc.Protocol.JsonRpcMessage -> unit
override this.Serialize : System.Buffers.IBufferWriter<byte> * StreamJsonRpc.Protocol.JsonRpcMessage -> unit
Public Sub Serialize (contentBuffer As IBufferWriter(Of Byte), message As JsonRpcMessage)
Parameters
- contentBuffer
- IBufferWriter<Byte>
The receiver of the serialized bytes.
- message
- JsonRpcMessage
The message to serialize.