-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about (de)serializing vectors #254
Comments
Please provide a complete Rust program, any relevant inputs, actual output and desired output. |
Program use std::io; #[derive(Serialize, Deserialize, Debug)] fn main() { Actual output |
Hi, I have the same problem. But I guess the behavior is known since it's documented here: Is this behavior desired? It seems an odd choice for serializing into csv |
It's not only desired, I'm not aware of any reasonable alternative other than disallowing it entirely. If you call it odd, why not say why it's odd and suggest an alternative behavior? The OP's suggestion is not reasonable here because it layers a completely different serialization format that is not CSV on top of CSV. |
Hi, thanks for providing this great crate.
Currently, when I am using the crate to serialise a vector inside a struct it will be flattened, so say I have:
struct A {
a : String,
b : Vec<i64>
}
and I have a flexible writer, then two As {"Hello",[1,2,3]}, {"Bye", [4,5,6,7]} would be serialized to
"Hello", 1,2,3,
"Bye", 4,5,6,7
Is there any way I can tell the CSV writer to serialize it to
"Hello", [1,2,3]
"Bye", [4,5,6,7]
?
The text was updated successfully, but these errors were encountered: