[erlang-questions] JSON encoding of arrays of arrays

Bob Ippolito bob@REDACTED
Fri Oct 22 03:11:18 CEST 2010


I'm surprised that people are finding it to be complicated. A list of
lists is literally an erlang list with erlang lists in it. It looks
like the documentation does need some improvement though, it's only
really obvious if you use it or if you read through the data types.

{struct, [{binary(), json_term()}]} is an object
[json_term()] is a list
binary() is a string
integer()/float() are number
true/false/null atoms map to the same terms in json.

On Fri, Oct 22, 2010 at 6:34 AM, Alessandro Sivieri
<alessandro.sivieri@REDACTED> wrote:
> 2010/10/22 Paul Oliver <puzza007@REDACTED>
>
>> The way I've seen it done by a guy at work is to reverse engineer it
>> by passing what you want back through mochijson2:decode
>>
>>
> Yes, I did exactly this in the end; thanks!
>
> --
> Sivieri Alessandro
> alessandro.sivieri@REDACTED
> http://www.chimera-bellerofonte.eu/
> http://www.poul.org/
>


More information about the erlang-questions mailing list