[erlang-questions] canonical encoding for term_to_binary/binary_to_term ?
Tue Nov 7 23:51:27 CET 2017
The ETF format is fairly straight forward so, performance considerations
excluded, is shouldn't be too hard to code a custom encoder which creates a
bijective mapping between terms and binaries.
A while back I worked a bit on an ETF decoder with customizable
restrictions on which types to accept to decode (and which to reject); I'm
sharing it in case someone finds it enlightening. I found the trickier
cases to be pids, ports, references and anonymous functions.
On 7 November 2017 at 20:07, Benoit Chesneau <bchesneau@REDACTED> wrote:
> Following the recent discussion on maps ordering, I’m curious if someone
> has already worked on an implementation of a canonical
> term_to_binary/binary_to_term to be able to sign them and make sure we get
> the same data across the wire.
> Is there any lib that does that around? For now i’m just using a
> canonical version of JSON but it’s pretty inefficient …
> - benoit
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions