You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---
level: error
---
# Use CamelCase Serialialization
We primarily use TypeScript on the other end, so all serialized structs should be in CamelCase.
```grit
language rust
`#[derive($derive)]` as $attr where {
$derive <: contains `Serialize`,
$attr <: not before `#[serde(rename_all = "camelCase")]`,
$attr += `#[serde(rename_all = "camelCase")]`
}
Basic Example
Before:
Fixed:
Countercase
If you need to serialize a struct in a different case, you can use the
#[serde(rename_all = "camelCase")]
attribute.The text was updated successfully, but these errors were encountered: