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.