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

#2012 in Encoding

Download history 2326/week @ 2024-03-13 2623/week @ 2024-03-20 2565/week @ 2024-03-27 1397/week @ 2024-04-03 1560/week @ 2024-04-10 1678/week @ 2024-04-17 2018/week @ 2024-04-24 1046/week @ 2024-05-01 3196/week @ 2024-05-08 2309/week @ 2024-05-15 2270/week @ 2024-05-22 2060/week @ 2024-05-29 1855/week @ 2024-06-05 1732/week @ 2024-06-12 1922/week @ 2024-06-19 2248/week @ 2024-06-26

8,226 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