Rule 142e-enc-float-null
Encoding
(142)
Comments
JSON has no number for NaN or for an infinity. Such a float is encoded as , which a Float port does not decode, while a Maybe Float port decodes it as Nothing.
TeX source
\defnrule[r:e-enc-float-null]
{\sv\in\effFlt\setminus\effFltFin}
{\Enc{\tFloat}(\sv)=\effnull}Tests (1)
- elm / StandardA88PortNonFiniteTestA NaN or an infinity sent out through a port arrives as JSON `null`.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:e-enc-float-null] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.