5 releases

0.1.0 Feb 18, 2025
0.0.3 Apr 23, 2022
0.0.2 Apr 18, 2022
0.0.1 Apr 18, 2022
0.0.0 Apr 15, 2022

#519 in Encoding

Download history 1229/week @ 2024-11-17 1591/week @ 2024-11-24 947/week @ 2024-12-01 978/week @ 2024-12-08 1113/week @ 2024-12-15 981/week @ 2024-12-22 825/week @ 2024-12-29 1405/week @ 2025-01-05 827/week @ 2025-01-12 623/week @ 2025-01-19 275/week @ 2025-01-26 794/week @ 2025-02-02 635/week @ 2025-02-09 746/week @ 2025-02-16 666/week @ 2025-02-23 572/week @ 2025-03-02

2,718 downloads per month
Used in 3 crates (via serfig)

Apache-2.0

59KB
1.5K SLoC

serde-bridge   Build Status Latest Version chat

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.3MB
~23K SLoC