xyncro / chiron

JSON for F#
https://xyncro.tech/chiron
MIT License
175 stars 41 forks source link

floats: -Infinity, +Infinity, NaN serialise funky #28

Closed haf closed 8 years ago

haf commented 9 years ago

Consider how they should be handled; since they're not valid JSON, consider throwing an exception (partial function approach), or writing it as a string.

kolektiv commented 9 years ago

Hmmm. I think throwing is probably as sensible as anything in this case, as much as I dislike partial functions - better than silently losing fidelity I think...

haf commented 9 years ago

Ping?

kolektiv commented 9 years ago

Yeah, I think I'm happy with exception cases. Added to milestone...

kolektiv commented 9 years ago

https://github.com/kolektiv/chiron/commit/ad5bf47d25920ef5f1e469725e01b3d8a01b346e should include a fix for this.

haf commented 9 years ago

:+1:

neoeinstein commented 8 years ago

Before we release 8.0, we ought to add a similar validation to serializing single as well.

kolektiv commented 8 years ago

Hmmm, yes very true. I'll have a glance at that later.

kolektiv commented 8 years ago

Guard against this has gone in to 6.0.0-rc5 which I've just pushed. I'll close this off now as I think the basic scope is covered, and newer and shinier testing can produce newer and shinier bug reports... :)