Closed 23W closed 3 years ago
Thanks for your suggestion, I changed the method signature:
JsonSerializeResult Serialize(object[] data)
btw, I implement 2 IJsonSerializer:
If you use Newtosoft.Json, you can install SocketIOClient.Newtonsoft.Json
from NuGet
var client = new SocketIO(...);
client.JsonSerializer = new NewtonsoftJsonSerializer(client.Options.EIO);
https://github.com/doghappy/socket.io-client-csharp/commit/35e8f3cc5baecc2ffbfab4de137265f743efb34e
Thank you,
I can not use neither SystemTextJsonSerializer
nor NewtonsoftJsonSerializer
because have different logic of serialization in my project that's why I need own implementation of IJsonSerializer
.
@doghappy Hi, can you please add the documentation how to implement interface(T data) always gets an array of objects (or enumerable interface of objects). Because currently it's not obvious.
IJsonSerializer
, or comments for its methods. At least it should be commented in code that method Serialize