Open tntokum opened 2 months ago
I would have thought that this works 😬 thanks for the report, I'll have a look where the problem lies!
Hmm, I can see that serde_json is doing some black magic here. I didn't understand it for now, will need some more time...
Thanks for looking! Yeah, I'm seeing the same thing in serde_json
. The arbitrary precision flag makes it look like there are basically 4 ways of parsing ints -- extra weird.
No worries if it's a bit out of reach for now, I'm working with the Value
enum and it's getting the job done 😀
Hi, I'm currently using
serde_pickle
to unpack some Python pickles, and it's working great for the most part! However, I'd like to directly deserialize fields of arbitrary-sized integers into theValue
enum; currently, this doesn't seem possible (please correct me if I'm wrong). It seems likeserde_json
handles this sort of deserialization pretty well, and I'd like to be able to do the same with your library.Use case: I have some data containing a lot of fields, a few of which are multi-precision integers. I want to deserialize my data directly into a struct representation, with the field corresponding to the big number containing a
Value
. Right now, I'm forced to deserialize the entire thing into a Value as soon as I run into the number, removing a lot of theserde
ergonomics by adding a lot of parsing overhead. Here's a small Rust stub to show rather than tell:Do you have any thoughts on this, or whether you'd support adding this functionality? I've been looking at the
Deserializer
myself to start getting this going. Thank you!