<div>I'd like to send a term_to_binary encoded term to a web client and decode it in javascript.</div><div><br></div><div>If I could do this it would eliminate the impedance mismatch between server-side databases</div>
<div>and client code in a browser. I want to totally eliminate conversions to and from JSON. Just send</div><div>raw blobs containing term_to_binary encoded data and pluck what I want in the client.</div><div><br></div><div>
I would not necessarily want to decode the entire blob, I might just want to extract a specific item</div><div>So for example if In Erlang I created a blob by saying</div><div><br></div><div>      Blob = term_to_binary({thing,"foo","bar",["baz"]})</div>
<div><br></div><div>I'd like to send this to a browser and in Javascript say:</div><div><br></div><div>     var z = mylib_hd(my_lib_element(4,Blob))</div><div><br></div><div>Whereby z would be the javascript string "baz".</div>
<div><br></div><div>Has anybody implemented anything like this?</div><div><br></div><div>/Joe</div><div><br></div><div><br></div><div><br></div>