[erlang-questions] Json as binary RabbitMQ Payload

Juan Jose Comellas juanjo@REDACTED
Sat Aug 3 03:13:33 CEST 2013


You could use JSX [1], which encodes/decodes binaries by default. Bear in
mind that the decoded format is not the same one mochiweb uses.

[1] https://github.com/talentdeficit/jsx


On Fri, Aug 2, 2013 at 9:20 PM, Thomas Elsgaard
<thomas.elsgaard@REDACTED>wrote:

> Hi all
>
> With mochijson2 i am encoding to json:
>
> D = mochijson2:encode({struct, [{"id", Id}]})
>
> Now i would like to pass D to rabbitMQ as a payload , but in order to do
> that, it should be  binary, how i can do that ?
>
>  Thomas
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130802/455f111c/attachment.htm>


More information about the erlang-questions mailing list