Hacker News new | ask | show | jobs
by ayosec 3046 days ago
> Even serde has `#[serde(rename = "name")]` for this purpose.

You can use `#[serde(rename_all = "camelCase")]`[1] in the struct to apply the fix to all fields.

[1]: https://serde.rs/container-attrs.html#serderenameall--