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

#1933 in Encoding

Download history 2046/week @ 2024-07-21 1708/week @ 2024-07-28 1901/week @ 2024-08-04 1484/week @ 2024-08-11 1482/week @ 2024-08-18 948/week @ 2024-08-25 1540/week @ 2024-09-01 1198/week @ 2024-09-08 834/week @ 2024-09-15 1024/week @ 2024-09-22 329/week @ 2024-09-29 1103/week @ 2024-10-06 932/week @ 2024-10-13 1159/week @ 2024-10-20 1484/week @ 2024-10-27 1008/week @ 2024-11-03

4,764 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.5MB
~26K SLoC