-
-
Notifications
You must be signed in to change notification settings - Fork 888
Open
Description
Whe using MessagePack with flatten struct and the pm_serde::to_vec the serializer produce properties names for flatten structs.
It should not produce these names since pm_serde::to_vec is supposed to generate array separated properties (by position)
#[derive(Serializer)]
pub struct BaseStruct
{
pub a: int;
pub b: int;
}
#[derive(Serializer)]
pub struct RootStruct
{
#[serde(flatten)]
pub base: BaseStruct;
pub c: int;
}Current MessagePack binary => JSON output
[
"base": {
"a": 1,
"b": 2
},
3
]Expected output:
[1,2,3]Based on this issue its a flatten limitation that needs attention:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels