Skip to content

Infinities and NaNs get encoded as invalid JSON #42

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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