<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Since websockets nowadays support binary data, I implemented binary Erlang External Term serialization, so that term_to_binary(Term) can be decoded into Javascript objects and vice versa.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I'd like to share this example that illustrates the experiment:</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><a href="https://github.com/saleyn/erws_example">https://github.com/saleyn/erws_example</a><br>
</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The Javascript file (used by the example above) with encoding/decoding logic:</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><a href="https://github.com/saleyn/erlb.js">https://github.com/saleyn/erlb.js</a><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
(this is an early beta version)</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">This is a more-or-less belated answer to the question raised by Joe in this thread:<br>
<a href="http://erlang.org/pipermail/erlang-questions/2011-November/062477.html">http://erlang.org/pipermail/erlang-questions/2011-November/062477.html</a><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
Serge</div></div>