Skip to content

Infinities and NaNs get encoded as invalid JSON #42

@snej

Description

@snej

A Fleece value can legitimately be a floating-point infinity or NaN, since it just stores a binary IEEE format float/double.

However, there's no JSON encoding of such a value. Currently Fleece just uses sprintf, which writes something like Inf or NaN ... resulting in invalid JSON.

Instead, the best behavior is probably to fail (throw an exception / return an error) when encoding such a value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions