Rule 154e-enc-value
Encoding
(154)
Comments
A value of type Json.Encode.Value is already a JSON value and is sent as it is. The side condition holds of every value of that type, so no byte sequence is ever sent through Json.Encode.Value.
TeX source
\defnrule[r:e-enc-value]
{j\in\JVal}
{\Enc{\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-enc-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.