Owned JSON Deserializer

Crates.io Documentation License Dragon Powered

Because apparently serde_json only deserializes through a referenceā„¢.

Usage

```rust use serde::{Deserialize, Deserializer}; use ownedjsondeserializer::OwnedJsonDeserializer;

[derive(Deserialize)]

struct Wave { hi: String, }

fn gimmeadeserializer(sayhito: String) -> impl Deserializer<'static> { OwnedJsonDeserializer::fromstring( format!(r#"{{ "hi": "{}" }}"#, sayhi_to) ) }

fn main() { let deserializer = gimmeadeserializer("mom".tostring()); let wave = Wave::deserialize(deserializer).unwrap(); asserteq!(wave.hi, "mom"); } ```

License

This crate is dual-licensed under either:

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.