Skip to content

Safe date serialization/possible data corruption #486

@stefnotch

Description

@stefnotch

When saving an object like { a: "0000-00-00T00:00:00" } and subsequently reading it, the string will become a date object. This means that with some data, this library cannot safely round-trip.

if (typeof value == "string" && this.dateRegex.exec(value) != null) {

I recommend doing it correctly, see https://stackoverflow.com/a/73155667/3492994

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