Rule 146e-enc-bytes
Encoding
(146)
Comments
A value of type Bytes is sent as its byte sequence, which is not a JSON value: not a string, and not an array of numbers. Here each on the left is an Int value and on the right the same integer.
TeX source
\defnrule[r:e-enc-bytes]
{}
{\Enc{\tBytes}(\dbbin\,[o_1,\ldots,o_k])=\effbytes(o_1\cdots o_k)}Tests (2)
- elm / PortPipeBytesRejectTestA JSON value sent to a `Bytes` port is rejected, whatever it holds.
- elm / PortPipeBytesTestA byte sequence received at `Bytes` goes out again as the same byte sequence.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:e-enc-bytes] 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.