Closed tsbernar closed 9 months ago
Hey @tsbernar did you manage to fix this somehow?
No, Iām still facing this issue
serde(flatten)
is not supported.
If you work with JSON, maybe this library is closer to what you need? https://graham.cool/schemars/
If you work with both JSON and a binary format tracked by serde-reflection
, you can branch the definition of serde::{Serialize,Deserialize}
for your struct using is_human_readable
, like this: https://github.com/linera-io/linera-protocol/blob/2b46124fff612b25cd8453ec8573ce48e37b214f/linera-version/src/serde_pretty/mod.rs#L20
@banool What change in serde 1.0.53 caused the issue?
š Bug
Adding #[serde(flatten)] makes trace_name fail to find the name.
To reproduce
Code snippet to reproduce
Stack trace/error message
Expected Behavior
Expected behavior is to find the struct name correctly.
System information
Please complete the following information:
Additional context
Add any other context about the problem here.