This is just mostly a note for myself, but feel free to comment anything you think is relevant
Just figured out some more of Serde's features that could really help with improving deserialization of JSON from Roblox.
#[serde(alias = "")]: useful for if fields are named different things but are otherwise the same
name: Option<Value>: can handle fields just not existing
- So can
#[serde(default)] or #[serde(default = "path")]
#[serde(rename(deserialize = "de_name"))] can help for mapping camelCase names to snake_case names
Honestly, this website will probably be really useful.
This is just mostly a note for myself, but feel free to comment anything you think is relevant
Just figured out some more of Serde's features that could really help with improving deserialization of JSON from Roblox.
#[serde(alias = "")]: useful for if fields are named different things but are otherwise the samename: Option<Value>: can handle fields just not existing#[serde(default)]or#[serde(default = "path")]#[serde(rename(deserialize = "de_name"))]can help for mapping camelCase names to snake_case namesHonestly, this website will probably be really useful.