Пример #1
0
 protected override JObject?Serialize <T>(T instance)
 => JsonSerialization.Serialize(instance);
Пример #2
0
 protected override object Deserialize(Type paramType, JObject message)
 => JsonSerialization.ToObject(paramType, message);
 protected override JObject Decode(byte[] message)
 => JsonSerialization.Deserialize(Encoding.UTF8.GetString(message));
Пример #4
0
 protected override TParam Deserialize <TParam>(JObject message)
 => JsonSerialization.Deserialize <TParam>(message);
 protected override byte[] EncodeBody <T>(T message)
 => Encoding.UTF8.GetBytes(JsonSerialization.Serialize(message).ToString( ));