Skip to content

S.float allows Infinity but serialises it to null #138

@mediremi

Description

@mediremi

When serialising Infinity to JSON using S.float, it becomes null. However, this means that when parsing the serialised JSON, sury throws the error Expected number, received null.

I think it'd make sense for S.float to throw an error when given Infinity, just like it does for NaN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions