Skip to content

Validate doesn't run on data post JSON encode #68

@nezuo

Description

@nezuo

When saving data to Data Stores, Roblox first JSON encodes the data. This can change document data in subtle ways. For example, number keys in a non-array table will be converted to strings. Since validate runs before Roblox JSON encodes the data, the user's validate function won't catch this.

A potential solution is to JSON encode the data and then validate the decoded data. This isn't ideal for performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions