| Crates.io | serde_tuple_macros |
| lib.rs | serde_tuple_macros |
| version | 1.1.2 |
| created_at | 2020-03-20 18:50:57.387278+00 |
| updated_at | 2025-07-15 13:36:19.914847+00 |
| description | Internal proc-macro crate for serde_tuple |
| homepage | |
| repository | https://github.com/kardeiz/serde_tuple |
| max_upload_size | |
| id | 220765 |
| size | 11,152 |
serde_tupleSerialize and deserialize structs with named fields as an array of values using Derive macros.
use serde_tuple::*;
#[derive(Serialize_tuple, Deserialize_tuple)]
pub struct Foo<'a> {
bar: &'a str,
baz: i32
}
fn main() {
let foo = Foo { bar: "Yes", baz: 22 };
let json = serde_json::to_string(&foo).unwrap();
println!("{json}");
// # => ["Yes",22]
}
See also this issue
make.
Install it with cargo install just.just.just test.Licensed under MIT license (LICENSE or https://opensource.org/licenses/MIT) at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.