-
Notifications
You must be signed in to change notification settings - Fork 170
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
Serde_json arbitrary precision #480
Comments
Yes, I think we need to add that. It's not pretty but I don't see a better way at the moment. For other readers, here's some context:
@717a56e1 Are you open to contributing a PR? |
I agree but IIRC this affects mainly |
Yup, got it running with a patched |
Probably better off in |
I don't know really because we re-export serde stuff from types so a utility function in types probably makes most sense but I need to see to code first before saying yes or no :) Either should be fine I think... |
Hey, I have investigated Further, as the Request/Response types in
Thus, the server supports plain |
@717a56e1 you can explain your use-case it would help us to understand the motivation behind this? |
I've been using custom types with It has been working fine on websockets (haven't really used I'm still fine opening a pull request for this, we had run into some strange behavior with serde untagged (specifically with Realistically at this point I see my use case moving away from untagged towards custom |
Perhaps a bit more context, I've rebased and applied the changes more consistently. Also, ID deserialization fails with |
ah, I see
I think we need put the
can you share the error? I think it might a similar reason. |
Sure thing. Let me park this on a branch as well: https://github.com/717a56e1/jsonrpsee
|
alright that is expected I realize now with We might consider to a handwritten deserialize impl for |
Hey @717a56e1 again, We have been discussing this internally and came to the conclusion not support this because it's really a "serde-json bug" and defeats the zero-alloc serialization/deserialization with serde_json::RawValue, "we" (parity) tried to get serde-rs/json#586 merged but got rejected so please work with serde to get this fixed properly. In addition it can break things because it's a feature flag so it will be enabled for anything that depends on serde (note if anyone enabled We might revisit this in the future but it's not really anything we will work on to support any time soon so closing this. |
@niklasad1 Any interest in getting arbitrary-precision working without serde flatten/untagged? I see you've gotten rid of most of the uses of untagged besides If so I can open another issue/PR. |
Go ahead and open a PR so I understand what you mean, so it depends how clean it will be :) |
jsonrpc
had a feature flag to allowarbitrary_precision
, this library currently breaks if it is built with it. Could be we open to adding a similarserde_from_str
override?The text was updated successfully, but these errors were encountered: