4 releases

0.0.3 Apr 23, 2022
0.0.2 Apr 18, 2022
0.0.1 Apr 18, 2022
0.0.0 Apr 15, 2022

#1845 in Encoding

Download history 2378/week @ 2023-12-03 2330/week @ 2023-12-10 2142/week @ 2023-12-17 1790/week @ 2023-12-24 1431/week @ 2023-12-31 1800/week @ 2024-01-07 2735/week @ 2024-01-14 2999/week @ 2024-01-21 2045/week @ 2024-01-28 1388/week @ 2024-02-04 60/week @ 2024-02-11 1790/week @ 2024-02-18 2741/week @ 2024-02-25 2219/week @ 2024-03-03 1930/week @ 2024-03-10 2715/week @ 2024-03-17

9,719 downloads per month
Used in 2 crates (via serfig)

Apache-2.0

59KB
1.5K SLoC

serde-bridge   Build Status Latest Version

Bridge between serde types

Quick Start

use anyhow::Result;
use serde_bridge::{from_value, into_value, FromValue, IntoValue, Value};

fn main() -> Result<()> {
    let v = bool::from_value(Value::Bool(true))?;
    assert!(v);

    let v: bool = from_value(Value::Bool(true))?;
    assert!(v);

    let v = true.into_value()?;
    assert_eq!(v, Value::Bool(true));

    let v = into_value(true)?;
    assert_eq!(v, Value::Bool(true));

    Ok(())
}

Contributing

Check out the CONTRIBUTING.md guide for more details on getting started with contributing to this project.

Getting help

Submit issues for bug report or asking questions in discussion.

Acknowledgment

This project is highly inspired by serde-value

License

Licensed under Apache License, Version 2.0.

Dependencies

~1.1–1.5MB
~26K SLoC