Tahler / currency-rs

A library providing a way to represent currencies in Rust.
http://tahler.github.io/currency-rs/currency/index.html
MIT License
8 stars 4 forks source link

Serde Support #7

Open brycefisher opened 6 years ago

brycefisher commented 6 years ago

I have a branch which implements Serde support. Would you be interested in accepting that? Its super super simple right now and might need a little polish. Let me know and I'll open a PR for that :-)

Tahler commented 6 years ago

I took a look at your branch and the implementation seems simple and adequate. My only concern is that it's adding unneeded dependencies, but if my suspicions are correct, that LLVM will eliminate that code when unused, then I'd be happy to accept it.

My only other comment is that seems odd to only implement deserialization and not serialization, but I suppose it doesn't hurt to have it.

brycefisher commented 6 years ago

@Tahler -- thanks for accepting my PR! I can push another PR that adds deserialization support too, I just didn't need that for my personal use case :-)

sssilver commented 6 years ago

Deserialization would be awesome, we had to move away from this crate because it didn't support Serde deserialization, and we didn't have time to implement it.

brycefisher commented 6 years ago

See #8 for serialization and deserialization

brycefisher commented 6 years ago

@Tahler -- if you prefer, I can create a cargo feature gate to provide compile time toggle on serde.