| Crates.io | shapely-json |
| lib.rs | shapely-json |
| version | 3.1.0 |
| created_at | 2025-03-10 20:30:03.685988+00 |
| updated_at | 2025-03-31 19:07:58.529699+00 |
| description | JSON serialization and deserialization for Shapely types |
| homepage | https://github.com/bearcove/shapely |
| repository | https://github.com/bearcove/shapely |
| max_upload_size | |
| id | 1587207 |
| size | 47,501 |
A serialization and deserialization library for JSON using the shapely runtime reflection system.
Shapely traituse shapely::Shapely;
use shapely_json::from_json;
#[derive(Debug, Shapely, PartialEq)]
struct Person {
name: String,
age: u64,
}
let json = r#"{"name": "Alice", "age": 30}"#;
let mut partial = Person::partial();
from_json(&mut partial, json).expect("Failed to parse JSON");
let person = partial.build::<Person>();
assert_eq!(person, Person { name: "Alice".to_string(), age: 30 });
Thanks to Namespace for providing fast GitHub Actions workers:
Licensed under either of:
at your option.