Skip to content

Improve deserialization with Serde features #9

@LawsOfScience

Description

@LawsOfScience

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions