mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-17 19:33:07 +00:00
SocketConnection.Send check if object is string, if so it doesn't deserialize again
This commit is contained in:
@@ -216,7 +216,10 @@ namespace CryptoExchange.Net.Sockets
|
||||
/// <param name="nullValueHandling">How null values should be serialized</param>
|
||||
public virtual void Send<T>(T obj, NullValueHandling nullValueHandling = NullValueHandling.Ignore)
|
||||
{
|
||||
Send(JsonConvert.SerializeObject(obj, Formatting.None, new JsonSerializerSettings { NullValueHandling = nullValueHandling }));
|
||||
if(obj is string str)
|
||||
Send(str);
|
||||
else
|
||||
Send(JsonConvert.SerializeObject(obj, Formatting.None, new JsonSerializerSettings { NullValueHandling = nullValueHandling }));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user