Interface IJsonRpcMessageTextFormatter
- Namespace
- StreamJsonRpc
- Assembly
- StreamJsonRpc.dll
An IJsonRpcMessageFormatter that formats messages as JSON (text).
public interface IJsonRpcMessageTextFormatter : IJsonRpcMessageFormatter
- Inherited Members
Properties
Encoding
Gets or sets the encoding used for serialization for methods that do not take an explicit Encoding.
Encoding Encoding { get; set; }
Property Value
- Encoding
Never null.
Exceptions
- ArgumentNullException
Thrown at an attempt to set the value to null.
Methods
Deserialize(ReadOnlySequence<byte>, Encoding)
Deserializes a sequence of bytes to a JsonRpcMessage.
JsonRpcMessage Deserialize(ReadOnlySequence<byte> contentBuffer, Encoding encoding)
Parameters
contentBuffer
ReadOnlySequence<byte>The bytes to deserialize.
encoding
EncodingThe encoding to read the bytes in
contentBuffer
with. Must not be null.
Returns
- JsonRpcMessage
The deserialized message.