-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not compatible with Thoth.Json 3-beta #17
Comments
I was thinking about changing the serializer to the same as Fable.Remoting as it seems to be working ok for the same use case. I hope the bundle size won't get out of control, because the changelog of Thoth says that it should have better bundle size with that new version. I'll do some tests. Thanks for letting me know! |
One issue I had with the Remoting serializer is that it doesn't allow you to inject serializers for your own classes. That means anything except built-ins, tuples, unions, records, doesn't work. I haven't looked too deep into it, but theoretically, the extra/custom serializers might solve this for Thoth. On the other hand, I doubt this is really a common scenario for Elmish.Bridge, 99.99% of the time you probably just want to exchange a small union type. |
I uploaded a version using the same serializer as Remoting with a small tweak that check the base server union type and auto register every type used inside it if there is no ambiguity. But yes, the recommended scenario is to exchange the messages as an union type. |
I added a crude custom serializer support on the |
Actually there is a problem with the custom deserializer as it requires converion to exact server message. What if I have something like type |
Thoth.Json 3 is currently in beta.
When I tried to use Thoth.Json 3.0.0-beta-002 with Elmish.Bridge.Client 2.0.1, I got this error:
The text was updated successfully, but these errors were encountered: