svenvc / ston

STON - Smalltalk Object Notation - A lightweight text-based, human-readable data interchange format for class-based object-oriented languages like Smalltalk.
MIT License
135 stars 32 forks source link

Special floating point values cause errors on materialization #37

Closed webwarrior-ws closed 2 years ago

webwarrior-ws commented 2 years ago

Special Float values (Float nan, Float infinity, Float negativeInfinity) are serialized as (Float nan, Float infinity, Float infinity negated) respectively. This causes error when trying to materialize them. The way they are written out is not compatible with STON spec. So perhaps it would be better to represent them as Float [ #nan ] and similar.

svenvc commented 2 years ago

I implemented your suggestion in https://github.com/svenvc/ston/commit/a9959114c3036aad1dd5c327a5b8ac3309e4c3e5

Thanks !