Rule 140e-enc-int
Encoding
(140)
Comments
The integer itself is the JSON number. Whether a host can hold every integer of exactly is not a matter for the definition (Appendix E).
TeX source
\defnrule[r:e-enc-int]
{}
{\Enc{\tInt}(\sv)=\sv}Tests (6)
- elm / MinimalPipeIntTestA pipe at `Int`: the value the driver sends in comes back out.
- elm / PortEchoTestAn `Int` sent out through an outgoing port comes back unchanged through an incoming port.
- elm / PortPipeRecordTestA JSON object received at a record type goes out with exactly the record's fields.
- elm / PortPipeRejectTestValues that do not decode at an incoming port's type are rejected, and the program goes on.
- elm / PortPipeScalarsTestJSON numbers, Booleans, strings and `null` received at `Float`, `Int`, `Bool`, `String` and `()` go out as they came.
- elm / PortPipeTupleTestA JSON array received at a tuple type goes out with as many elements as the tuple has.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:e-enc-int] 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.