[erlang-questions] json serialization of nested records
黃耀賢 (Yau-Hsien Huang)
g9414002.pccu.edu.tw@REDACTED
Fri Aug 20 20:39:42 CEST 2010
T1 = #topscore{place = <<"1">>, user_id = <<"Us">>, score = <<"200">>},
T2 = #topscore{place = <<"2">>, user_id = <<"Us2">>, score = <<"400">>},
Scores = #topscores{scores = [T1|T2]},
I think that you used [_|_] instead of [T1,T2], and
it made a list with it rest as a record.
Maybe #topscores{scores=[T1,T2]} would work.
On Sat, Aug 21, 2010 at 1:36 AM, gnoblin <gnoblin@REDACTED> wrote:
> hello!
>
> is it possible to serialize a record to json (I use json.erl) like
> this:
>
> http://gist.github.com/538245 ?
>
> I have an error in my console when I try this.
>
> thanks
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>
More information about the erlang-questions
mailing list