sephynox / xrpl-rust

A 100% Rust library to interact with the XRPL. XRPL Grant Winner
https://crates.io/crates/xrpl-rust
ISC License
20 stars 8 forks source link

DEV: False serialization #8

Closed LimpidCrypto closed 2 years ago

LimpidCrypto commented 2 years ago

Currently all struct fields for transaction and request models are serialized from sake_case to PascalCase. This is a problem because fields like flags for transactions and account for requests both need to be lowercase, but when serializing they get renamed to Flags and Account, which is invalid. I tried using #[serde(rename = "flags")], but #[serde(rename_all(serialize = "PascalCase", deserialize = "snake_case"))] seems to have a higher priority. It is possible to build custom Serialize implementations, but I could not figure out a good way to do it, yet.

LimpidCrypto commented 2 years ago

I think I got a little bit mixed up how serialization works here. Serialization works fine :)