Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Xuanwo/serde-bridge
A bridge between different serde implementations.
https://github.com/Xuanwo/serde-bridge
Last synced: 2 months ago
JSON representation
A bridge between different serde implementations.
- Host: GitHub
- URL: https://github.com/Xuanwo/serde-bridge
- Owner: Xuanwo
- License: apache-2.0
- Created: 2022-04-18T02:52:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-05T10:57:00.000Z (over 1 year ago)
- Last Synced: 2024-11-01T08:33:43.293Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 35.2 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# serde-bridge [![Build Status]][actions] [![Latest Version]][crates.io] [![chat]][discord]
[Build Status]: https://img.shields.io/github/actions/workflow/status/Xuanwo/serde-bridge/ci.yml?branch=main
[actions]: https://github.com/Xuanwo/serde-bridge/actions?query=branch%3Amain
[Latest Version]: https://img.shields.io/crates/v/serde-bridge.svg
[crates.io]: https://crates.io/crates/serde-bridge
[chat]: https://img.shields.io/discord/1111711408875393035
[discord]: https://discord.gg/bmczSs2C69Bridge between serde types
## Quick Start
```rust
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](./CONTRIBUTING.md) guide for more details on getting started with contributing to this project.
## Getting help
Submit [issues](https://github.com/Xuanwo/serde-bridge/issues/new/choose) for bug report or asking questions in [discussion](https://github.com/Xuanwo/serde-bridge/discussions/new?category=q-a).
## Acknowledgment
This project is highly inspired by [serde-value](https://github.com/arcnmx/serde-value)
#### License
Licensed under Apache License, Version 2.0.