Rule 168e-dec-value
Decoding
(168)
Comments
Every JSON value decodes at Json.Encode.Value. A boundary value in which a byte sequence occurs is not a JSON value, and does not decode there: it is rejected.
TeX source
\defnrule[r:e-dec-value]
{j\in\JVal}
{\Dec{\tValue}(j)=j}Tests (4)
- elm / MinimalPipeValueTestA pipe at `Value`: the value the driver sends in comes back out.
- elm / PortEchoJsonValueTestJSON `Value`s received as flags are sent out through a port as they are, and come back through an incoming port decoded at a concrete type.
- elm / PortPipeValueRejectsBytesTestA byte sequence sent to a `Json.Encode.Value` port is rejected, alone or inside an object.
- elm / PortPipeValueTestA JSON value received at `Json.Encode.Value` goes out again as the same JSON value.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:e-dec-value] 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.