stellar / rs-stellar-xdr

Rust lib for Stellar XDR.
Apache License 2.0
20 stars 27 forks source link

Fuzz the JSON conversion functionality of the types in this library #325

Open leighmcculloch opened 11 months ago

leighmcculloch commented 11 months ago

It would be worthwhile to fuzz the conversion of the Rust types to and from JSON. Most of the types use the derived serde serialization and deserialization, but some types use custom string serialization and deserialization.

The primary things to check are that:

  1. No Display impl returns an error, since doing so would cause any .to_string() call on the type to panic.

  2. FromStr and Display impls round trip to the same values, or in the case of utf8 lossy values.