Hey Guys, Thanks for the quick replay and sorry for delay. Acually I had
got the solution. So didn't reply on it.
Thanks for the reply
On Wednesday, October 30, 2013 3:37:09 PM UTC+5:30, Laxmikant Gurnalkar
wrote:
>
> Hi Guys,
>
> I am trying to convert an erlang term to json. On google I had found some
> solutions but did not work for me.
>
> This is the term that I have, In my controller:
>
> Properties = [
> { type, "Land" },
> { type_code: 1 },
> { subtypes, [ { "1": "Field" }, { "2": "Other Field" }, { "3":
> "Grounds" }, { "4": "Forest" }, { "5": "Other land" } ] }
> ].
>
> I tried lots of modules like json2, erlang-json etc. but getting only one
> error. That's why I came on a conclusion I'm doing something wrong.
>
> This is an error I'm facing each time:
>
> 1> json2:encode(Properties).
> ** exception exit: {json_encode,{bad_term,{type,"Land"}}}
> in function json2:encode/1 (json2.erl, line 92)
>
>
>
> -Could you please tell me, anything wrong here.
> -How to convert proplist to json in erlang?
>
> I saw mochijson2 module to do that on google, but not found in erlang on
> my machine. Which might be part of mochiweb, I guess.
> Is there any thing else available in erlang/ChicagBoss to do that?
>
> Thank you.
>
> Laxmikant Gurnalkar
>
>
--
You received this message because you are subscribed to the Google Groups
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit
https://groups.google.com/d/msgid/chicagoboss/0192e50e-70da-4d87-8e96-02d54315b0da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.